Don't use N-grams at query time.
-----Original message----- > From:prem1980 <prem1...@gmail.com> > Sent: Monday 4th August 2014 17:47 > To: solr-user@lucene.apache.org > Subject: Solr substring search yields all indexed results > > To do a substring search, I have added a new fieldType - "Text" with > NgramFilter. > > It works fine perfectly but downside is this problem > > Example > > name = ['Apple','Samy','And','a'] > When I do a search name:a, then all the above items gets pulled up. Even > when search changes to "App". All the above items are pulled. How can I fix > this issue? > > <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> > <analyzer type="index"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" > maxGramSize="100" /> > </analyzer> > </fieldType> > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Solr-substring-search-yields-all-indexed-results-tp4151012.html > Sent from the Solr - User mailing list archive at Nabble.com. >