Class ExactTokenAnalyzerFactory
java.lang.Object
com.apple.foundationdb.record.lucene.exact.ExactTokenAnalyzerFactory
- All Implemented Interfaces:
LuceneAnalyzerFactory
@AutoService(LuceneAnalyzerFactory.class)
public class ExactTokenAnalyzerFactory
extends Object
implements LuceneAnalyzerFactory
Constructs a new instance of
ExactTokenAnalyzer.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIndexAnalyzerChooser(Index ignored) Get an instance ofAnalyzerChooserthat chooses the Lucene analyzer based on texts for indexing, given theIndex.getName()Get the unique name for the Lucene analyzer factory.getQueryAnalyzerChooser(Index ignored, AnalyzerChooser alsoIgnored) Get an instance ofAnalyzerChooserthat chooses the Lucene analyzer for query given theIndex.getType()Get theLuceneAnalyzerTypefor the Lucene analyzer factory.
-
Field Details
-
NAME
- See Also:
-
UNIQUE_NAME
- See Also:
-
-
Constructor Details
-
ExactTokenAnalyzerFactory
public ExactTokenAnalyzerFactory()
-
-
Method Details
-
getName
Description copied from interface:LuceneAnalyzerFactoryGet the unique name for the Lucene analyzer factory. This is the name that should be included in the index meta-data in order to indicate that this analyzer factory should be used within a certain index.- Specified by:
getNamein interfaceLuceneAnalyzerFactory- Returns:
- the name of the analyzer that this factory creates
-
getType
Description copied from interface:LuceneAnalyzerFactoryGet theLuceneAnalyzerTypefor the Lucene analyzer factory.- Specified by:
getTypein interfaceLuceneAnalyzerFactory- Returns:
- the
LuceneScanTypesused to determine how the analyzers build by this factory is used
-
getIndexAnalyzerChooser
Description copied from interface:LuceneAnalyzerFactoryGet an instance ofAnalyzerChooserthat chooses the Lucene analyzer based on texts for indexing, given theIndex. For a given factory, each indexing analyzer chosen should be of the same type, and it should match the result ofLuceneAnalyzerFactory.getName().- Specified by:
getIndexAnalyzerChooserin interfaceLuceneAnalyzerFactory- Parameters:
ignored- the index thi analyzer is used for- Returns:
- an instance of the
AnalyzerChooserfor indexing that this factory creates
-
getQueryAnalyzerChooser
@Nonnull public AnalyzerChooser getQueryAnalyzerChooser(@Nonnull Index ignored, @Nonnull AnalyzerChooser alsoIgnored) Description copied from interface:LuceneAnalyzerFactoryGet an instance ofAnalyzerChooserthat chooses the Lucene analyzer for query given theIndex. For a given factory, each query analyzer chosen should be of the same type, and it should match the result ofLuceneAnalyzerFactory.getName(). CallLuceneAnalyzerFactory.getIndexAnalyzerChooser(Index)before calling this method, and use its return for the argumentindexAnalyzerChooser. No need to override this method ifStandardAnalyzeris to be used for query time. Override this method to customize the analyzer for query time, or directly return theindexAnalyzerChooserinstance, if it is used for both indexing and query time.- Specified by:
getQueryAnalyzerChooserin interfaceLuceneAnalyzerFactory- Parameters:
ignored- the index the analyzer is used foralsoIgnored- indexAnalyzerChooser the instance ofAnalyzerChooserfor indexing used by this factory, that can be returned by this method in case it is also used for query- Returns:
- an instance of the
AnalyzerChooserfor query that this factory creates, the default one is always usingStandardAnalyzer
-