Skip to content

Commit

Permalink
doc: add minimal usage to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-fra committed Sep 5, 2024
1 parent 450d7bf commit e463861
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,32 @@ _An improved Suggestion-Handler for Solr_

This is an update of the [Vind Suggestion Handler](https://github.com/RBMHTechnology/vind) compatible with Solr 9+.

## Usage

1. Add the following library to your Solr's lib-directory:
```xml
<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:
```xml
<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](LICENSE.txt) for more details.

0 comments on commit e463861

Please sign in to comment.