An improved Suggestion-Handler for Solr
This is an update of the Vind Suggestion Handler compatible with Solr 9+.
- Add the following library to your Solr's lib-directory:
<dependency> <groupId>io.redlink.solr</groupId> <artifactId>solr-advanced-suggester</artifactId> <version>${suggester.version}</version> </dependency>
- Within
solrconfig.xml
configure a dedicated suggestion-handler:For further details have a look at the solr-configuration used in the test.<requestHandler name="/suggester" class="io.redlink.solr.suggestion.SuggestionRequestHandler"> <lst name="defaults"> <!-- enable suggestions --> <str name="suggestion">true</str> <!-- create suggestions based on the following field --> <str name="suggestion.df">suggestions</str> <!-- limit the suggestions to 10 terms --> <str name="suggestion.term.limit">10</str> </lst> </requestHandler>
Free use of this software is granted under the terms of the Apache License Version 2.0. See the License for more details.