Skip to content

redlink-gmbh/solr-advanced-suggester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solr Suggester

An improved Suggestion-Handler for Solr

Build Status Quality Gate Status

Maven Central Sonatype Nexus (Snapshots) Javadocs Apache 2.0 License

This is an update of the Vind Suggestion Handler compatible with Solr 9+.

Usage

  1. 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>
  2. Within solrconfig.xml configure a dedicated suggestion-handler:
    <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>
    For further details have a look at the solr-configuration used in the test.

License

Free use of this software is granted under the terms of the Apache License Version 2.0. See the License for more details.