Reputation: 368
How to do solr search with partial string..?
For example: I am having shopping sites 'abcdef' , 'abcokp', 'abc'.. Then if I search 'abc' , then it should show all three sites. but it shows only last one 'abc'.
Any help?
Upvotes: 0
Views: 66
Reputation: 368
Change solr/conf.schema.xml with following snippet
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="15"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
Restart solr and done. Any other alternative, as schema.xml does not committed?
Upvotes: 1