views:

568

answers:

2

I have a problem with SOLR searching. When i`am searching query: dog* everything is ok, but when query is Dog*(with first capital letter), i get no results. Any advice? My config:

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
    <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
    <filter class="solr.WordDelimiterFilterFactory"  generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  </analyzer>
</fieldType>
+3  A: 

Received answer on another resource. The problem is: http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters"On wildcard and fuzzy searches, no text analysis is performed on the search word."

Hope, this will help someone.

Yurish
hey Yurish, thanks. I'm really stuck. is "q.alt" the only way to do wildcard searching? if so, is it possible to use "q.alt" and highlighting? if it's possible to do just "q" with wildcard, then how??
andy
For waht purposes do you need wild card? I am now implementing Hunspell stemming for my SOLR, because i need to search in Latvian, but there are many grammar laws, which are braking my index. If you need it because "your hands are also tied" with some grammar, than think about another way. q.alt won't help you, because it is "An alternate query to be used in cases where the main query (q) is not specified (or blank).". I can't see any case, where it can help you with wildcard and text analysis.
Yurish
A: 

Have you tried using EdgeNGrams? See my answer to question 2413946.

Jimmy