Employing autosuggest

Lucene's suggest module offers a number of implementations that can be used to support a real-time autosuggest feature when a user types into a search box. You will find many tools in the suggest module that helps facilitate the data ingestion process to the autosuggest index. In our demonstrations, we will be using LuceneDictionary to ingest data as it provides the convenience of extracting tokens from a field in an existing index.

We will go over four suggester implementations in this section:

  • AnalyzingSuggester: This suggester analyzes input text and provides suggestions based on prefixed matches.
  • AnalyzingInfixSuggester: This suggester builds on top of AnalyzingSuggester and provides suggestions based on the prefix matches ...

Get Lucene 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.