I am trying to implement auto complete feature using Solr 5.3.0
solrconfig.xml looks like this
The field on which you want to configure the suggester should be store=true
. It need not to be indexed. The suggester configuration will build a dictionary according to the provide configuration in the suggestComponet
. The name
field have stored as true
where as suggest_ngram
is not. You need to update the schema configuration like this:
<field name="suggest_ngram" type="text_suggest_ngram" indexed="false" stored="true"/>
Also you need to provide the parameter suggest.dictionary
, the dictionary you are using for suggestions. For you it is names as default
.
http://localhost:8983/solr/products/suggest?suggest=true&
suggest.build=true&
wt=json&
suggest.dictionary=default&
suggest.q=Jind
OR you can provide the dictionary configuration in requestHandler
of /suggest
:
<str name="suggest.dictionary">default</str>