lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shobhit <>
Subject Exact matches are not coming on Top for autocomplete search results.
Date Tue, 07 Oct 2014 15:55:00 GMT
I am trying to get the exact search term coming at top in Solr search
results, but solr is not returning the exact matching records on top,
instead exact matching terms are coming somewhere down after few records.

For example :  
I am searching for term "New York World", and I want the New York World to
come on top of solr search results, but solr is returning results as ,

New York World Journal 
New York World Telegram
New York World

*Search query used : *


*schema.xml *

<fieldType name="typeahead" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ISOLatin1AccentFilterFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" maxGramSize="100"
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ISOLatin1AccentFilterFactory"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="^(.{20})(.*)?"
replacement="$1" replace="all"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>

<field name="name_something" type="typeahead" indexed="true" stored="false"


requestHandler name="typeahead" class="solr.SearchHandler">
<lst name="defaults">
<str name="wt">json</str>
<int name="rows">10</int>
<str name="indent">true</str>
<str name="df">autosuggest</str>
<str name="q.op">AND</str>
<str name="fl">

kindly provide your suggestions to achieve this.

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message