Class CompletionAnalyzer

java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.AnalyzerWrapper
org.apache.lucene.search.suggest.document.CompletionAnalyzer
All Implemented Interfaces:
Closeable, AutoCloseable

public final class CompletionAnalyzer extends AnalyzerWrapper
Wraps an Analyzer to provide additional completion-only tuning (e.g. preserving token separators, preserving position increments while converting a token stream to an automaton)

Can be used to index SuggestField and ContextSuggestField and as a query analyzer to PrefixCompletionQuery amd FuzzyCompletionQuery

NOTE: In most cases, index and query analyzer should have same values for preservePositionIncrements() and preserveSep()

Since:
5.1.0
WARNING: This API is experimental and might change in incompatible ways in the next release.