Suppose my search query is "*Rak*".In my database i have "*Rakesh Chaturvedi
*" name.
I am getting "*<em>Rak</em><em>Rak</em>esh Chaturvedi*" as the response.

Same the case with the following names.

Search "Dhar" ------ highlight "<em>Dhar</em><em>Dhar</em>mesh Darshan"
Search "Suda"------ highlight "<em>Suda</em><em>Suda</em>rshan Faakir"

Can someone help me?

I am using the following filters for index and query.

<fieldType name="text_autofill" class="solr.TextField"
positionIncrementGap="100">
       <analyzer type="index">
         <tokenizer class="solr.KeywordTokenizerFactory"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" preserveOriginal="1"/>
         <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
maxGramSize="50" side="front"/>
       </analyzer>
       <analyzer type="query">
         <tokenizer class="solr.StandardTokenizerFactory"/>
         <filter class="solr.LowerCaseFilterFactory"/>
         <filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" preserveOriginal="1"/>
       </analyzer>
     </fieldType>

I don't think Highlighter can support n-gram field.
Can you try to comment out EdgeNGramFilterFactory and re-index then highlight?

koji
--
Check out "Query Log Visualizer" for Apache Solr
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/

Reply via email to