Class ExactFilenameAnalyzerProvider
java.lang.Object
com.atlassian.confluence.plugins.opensearch.analysis.analyzer.ExactFilenameAnalyzerProvider
- All Implemented Interfaces:
OpenSearchAnalyzerProvider
Provides OpenSearch analyzer for
ExactFilenameAnalyzerDescriptor to support exact matching on file names.
Use when indexing for fields which should support exact matches or when searching for fields which support exact matches for filenames.
Only create tokens by whitespace, and lowercase each token. Filenames will also be split into tokens the file extension delimiter ".". The original filename will also be a token.
e.g. "filename.txt" -> {"filename.txt", "filename", "txt"} "file name.txt" -> {"file name.txt", "file", "name", "txt"}
Searching for the original filename, the name or the extension will match.
- Since:
- 8.7
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opensearch.client.opensearch._types.analysis.AnalyzerClass<? extends MappingAnalyzerDescriptor>getName()booleanisCustom()
-
Field Details
-
NAME
The identifier that OpenSearch recognizes when setting up the custom analyzer.- See Also:
-
-
Constructor Details
-
ExactFilenameAnalyzerProvider
public ExactFilenameAnalyzerProvider()
-
-
Method Details
-
getMappingClass
- Specified by:
getMappingClassin interfaceOpenSearchAnalyzerProvider- Returns:
- the concrete type of
MappingAnalyzerDescriptorthat's mapped to this analyzer
-
getAnalyzer
public org.opensearch.client.opensearch._types.analysis.Analyzer getAnalyzer()- Specified by:
getAnalyzerin interfaceOpenSearchAnalyzerProvider- Returns:
- the OpenSearch analyzer for the given v2 analyzer specified at
OpenSearchAnalyzerProvider.getMappingClass().
-
getName
- Specified by:
getNamein interfaceOpenSearchAnalyzerProvider- Returns:
- the analyzer name that is registered in OpenSearch. It should be unique within the index it is used.
-
isCustom
public boolean isCustom()- Specified by:
isCustomin interfaceOpenSearchAnalyzerProvider- Returns:
- true if the analyzer needs to be declared as a custom analyzer when the index is created. Or false if the index is available built-in on OpenSearch.
-