I would understand if you had said that "Klostermeyer*" returned nothing because the presence of the wildcard used to suppress analysis, including the lower case filter so that the capital "K" term would never match an indexed term. But, I would have expected "klostermeyer*" to match "klostermeyer" since the unanalyzed wildcard prefix would have the same term value as "klostermeyer" when it is indexed. So, this is a mystery to me.

-- Jack Krupansky

-----Original Message----- From: Klostermeyer, Michael
Sent: Wednesday, June 27, 2012 11:14 AM
To: solr-user@lucene.apache.org
Subject: Wildcard queries on whole words

I am researching an issue w/ wildcard searches on complete words in 3.5. For example, searching for "kloster*" returns "klostermeyer", but "klostermeyer*" returns nothing.

The field being queried has the following analysis chain (standard 'text_general'):

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
     <analyzer type="index">
       <tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
       <filter class="solr.LowerCaseFilterFactory"/>
     </analyzer>
     <analyzer type="query">
       <tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
       <filter class="solr.LowerCaseFilterFactory"/>
     </analyzer>
</fieldType>

I see that wildcard queries are not analyzed at query time, which could be the source of my issue, but I read conflicting advice on the interwebs. I read also that this might have changed in 3.6, but I am unable to determine if my specific issue is addressed.

My questions:

1.       Why am I getting these search results with my current config?

2. How do I fix it in 3.5? Would upgrading to 3.6 also "fix" my issue?

Thanks!

Mike Klostermeyer

Reply via email to