Class VersionStringFieldMapper.VersionStringFieldType
java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.SimpleMappedFieldType
org.elasticsearch.index.mapper.TermBasedFieldType
org.elasticsearch.xpack.versionfield.VersionStringFieldMapper.VersionStringFieldType
- Enclosing class:
VersionStringFieldMapper
public static final class VersionStringFieldMapper.VersionStringFieldType
extends TermBasedFieldType
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.BlockLoaderContext, MappedFieldType.CollapseType, MappedFieldType.FielddataOperation, MappedFieldType.FieldExtractPreference, MappedFieldType.Relation -
Field Summary
Fields inherited from class org.elasticsearch.index.mapper.TermBasedFieldType
textSearchInfoFields inherited from class org.elasticsearch.index.mapper.MappedFieldType
indexType -
Method Summary
Modifier and TypeMethodDescriptionblockLoader(MappedFieldType.BlockLoaderContext blContext) docValueFormat(String format, ZoneId timeZone) org.apache.lucene.search.QueryexistsQuery(SearchExecutionContext context) fielddataBuilder(FieldDataContext fieldDataContext) org.apache.lucene.search.QueryfuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context, org.apache.lucene.search.MultiTermQuery.RewriteMethod rewriteMethod) We cannot simply use FuzzyQuery directly since we use the encoded terms from the dictionary, but the automaton in the query will assume unencoded terms.org.apache.lucene.index.TermsEnumgetTerms(org.apache.lucene.index.IndexReader reader, String prefix, boolean caseInsensitive, String searchAfter) protected org.apache.lucene.util.BytesRefindexedValueForSearch(Object value) org.apache.lucene.search.QueryprefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) org.apache.lucene.search.QueryrangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, SearchExecutionContext context) org.apache.lucene.search.QueryregexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) We cannot simply use RegexpQuery directly since we use the encoded terms from the dictionary, but the automaton in the query will assume unencoded terms.typeName()valueFetcher(SearchExecutionContext context, String format) valueForDisplay(Object value) org.apache.lucene.search.QuerywildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) Methods inherited from class org.elasticsearch.index.mapper.TermBasedFieldType
getTextSearchInfo, mayExistInIndex, termQuery, termQueryCaseInsensitive, termsQueryMethods inherited from class org.elasticsearch.index.mapper.SimpleMappedFieldType
rangeQueryMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
automatonQuery, checkNoFormat, checkNoTimeZone, collapseType, dimensions, distanceFeatureQuery, eagerGlobalOrdinals, failIfNoDocValues, failIfNotIndexed, failIfNotIndexedNorDocValuesFallback, familyTypeName, fieldHasValue, fuzzyQuery, getDefaultHighlighter, getMetricType, hasDocValues, hasScriptValues, indexType, isAggregatable, isDimension, isFieldWithinQuery, isSearchable, isStored, isVectorEmbedding, meta, multiPhraseQuery, name, normalizedWildcardQuery, phrasePrefixQuery, phraseQuery, pointReaderIfPossible, prefixQuery, spanPrefixQuery, supportsBlockLoaderConfig, validateMatchedRoutingPath, wildcardLikeQuery, wildcardQuery
-
Method Details
-
typeName
- Specified by:
typeNamein classMappedFieldType
-
valueFetcher
- Specified by:
valueFetcherin classMappedFieldType
-
existsQuery
- Overrides:
existsQueryin classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) - Overrides:
prefixQueryin classMappedFieldType
-
regexpQuery
public org.apache.lucene.search.Query regexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) We cannot simply use RegexpQuery directly since we use the encoded terms from the dictionary, but the automaton in the query will assume unencoded terms. We are running through all terms, decode them and then run them through the automaton manually instead. This is not as efficient as intersecting the original Terms with the compiled automaton, but we expect the number of distinct version terms indexed into this field to be low enough and the use of "regexp" queries on this field rare enough to brute-force this- Overrides:
regexpQueryin classMappedFieldType
-
fuzzyQuery
public org.apache.lucene.search.Query fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod rewriteMethod) We cannot simply use FuzzyQuery directly since we use the encoded terms from the dictionary, but the automaton in the query will assume unencoded terms. We are running through all terms, decode them and then run them through the automaton manually instead. This is not as efficient as intersecting the original Terms with the compiled automaton, but we expect the number of distinct version terms indexed into this field to be low enough and the use of "fuzzy" queries on this field rare enough to brute-force this- Overrides:
fuzzyQueryin classMappedFieldType
-
wildcardQuery
public org.apache.lucene.search.Query wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) - Overrides:
wildcardQueryin classMappedFieldType
-
indexedValueForSearch
- Overrides:
indexedValueForSearchin classTermBasedFieldType
-
blockLoader
- Overrides:
blockLoaderin classMappedFieldType
-
fielddataBuilder
- Overrides:
fielddataBuilderin classMappedFieldType
-
valueForDisplay
- Overrides:
valueForDisplayin classMappedFieldType
-
docValueFormat
- Overrides:
docValueFormatin classMappedFieldType
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, SearchExecutionContext context) - Overrides:
rangeQueryin classSimpleMappedFieldType
-
getTerms
public org.apache.lucene.index.TermsEnum getTerms(org.apache.lucene.index.IndexReader reader, String prefix, boolean caseInsensitive, String searchAfter) throws IOException - Overrides:
getTermsin classMappedFieldType- Throws:
IOException
-