java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.AbstractScriptFieldType<StringFieldScript.LeafFactory>
org.elasticsearch.index.mapper.KeywordScriptFieldType
public final class KeywordScriptFieldType
extends AbstractScriptFieldType<StringFieldScript.LeafFactory>
-
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
FieldsFields inherited from class org.elasticsearch.index.mapper.AbstractScriptFieldType
DEFAULT_SCRIPT, script -
Constructor Summary
ConstructorsConstructorDescriptionKeywordScriptFieldType(String name, StringFieldScript.Factory scriptFactory, Script script, Map<String, String> meta, OnScriptError onScriptError) -
Method Summary
Modifier and TypeMethodDescriptionblockLoader(MappedFieldType.BlockLoaderContext blContext) Returns a loader for ESQL ornullif the field doesn't support ESQL.org.apache.lucene.search.QueryexistsQuery(SearchExecutionContext context) fielddataBuilder(FieldDataContext fieldDataContext) Return a fielddata builder for this fieldorg.apache.lucene.search.QueryfuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context, org.apache.lucene.search.MultiTermQuery.RewriteMethod rewriteMethod) org.apache.lucene.search.QuerynormalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) 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, ZoneId timeZone, DateMathParser parser, SearchExecutionContext context) org.apache.lucene.search.QueryregexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) static RuntimeFieldsourceOnly(String name) org.apache.lucene.search.QuerytermQuery(Object value, SearchExecutionContext context) Generates a query that will only match documents that contain the given value.org.apache.lucene.search.QuerytermQueryCaseInsensitive(Object value, SearchExecutionContext context) org.apache.lucene.search.QuerytermsQuery(Collection<?> values, SearchExecutionContext context) Build a constant-scoring query that matches all values.typeName()Returns the name of this type, as would be specified in mapping propertiesvalueForDisplay(Object value) Given a value that comes from the stored fields API, convert it to the expected type.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.AbstractScriptFieldType
applyScriptContext, fieldHasValue, isAggregatable, isSearchable, leafFactory, leafFactory, multiPhraseQuery, phrasePrefixQuery, phraseQuery, rangeQuery, spanPrefixQuery, validateMatchedRoutingPath, valueFetcherMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
checkNoFormat, checkNoTimeZone, collapseType, dimensions, distanceFeatureQuery, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, failIfNotIndexedNorDocValuesFallback, familyTypeName, fuzzyIntervals, fuzzyQuery, getDefaultHighlighter, getMetricType, getTerms, getTextSearchInfo, hasDocValues, hasScriptValues, isDimension, isFieldWithinQuery, isIndexed, isStored, mayExistInIndex, meta, name, pointReaderIfPossible, prefixIntervals, prefixQuery, rangeIntervals, regexpIntervals, termIntervals, wildcardIntervals, wildcardQuery
-
Field Details
-
PARSER
-
-
Constructor Details
-
KeywordScriptFieldType
public KeywordScriptFieldType(String name, StringFieldScript.Factory scriptFactory, Script script, Map<String, String> meta, OnScriptError onScriptError)
-
-
Method Details
-
sourceOnly
-
typeName
Description copied from class:MappedFieldTypeReturns the name of this type, as would be specified in mapping properties- Specified by:
typeNamein classMappedFieldType
-
valueForDisplay
Description copied from class:MappedFieldTypeGiven a value that comes from the stored fields API, convert it to the expected type. For instance a date field would store dates as longs and format it back to a string in this method.- Overrides:
valueForDisplayin classMappedFieldType
-
blockLoader
Description copied from class:MappedFieldTypeReturns a loader for ESQL ornullif the field doesn't support ESQL.- Overrides:
blockLoaderin classMappedFieldType
-
fielddataBuilder
Description copied from class:MappedFieldTypeReturn a fielddata builder for this field- Overrides:
fielddataBuilderin classMappedFieldType- Parameters:
fieldDataContext- the context for the fielddata
-
existsQuery
- Overrides:
existsQueryin 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) - Overrides:
fuzzyQueryin classAbstractScriptFieldType<StringFieldScript.LeafFactory>
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) - Overrides:
prefixQueryin classAbstractScriptFieldType<StringFieldScript.LeafFactory>
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ZoneId timeZone, DateMathParser parser, SearchExecutionContext context) - Specified by:
rangeQueryin classAbstractScriptFieldType<StringFieldScript.LeafFactory>
-
regexpQuery
public org.apache.lucene.search.Query regexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) - Overrides:
regexpQueryin classAbstractScriptFieldType<StringFieldScript.LeafFactory>
-
termQueryCaseInsensitive
public org.apache.lucene.search.Query termQueryCaseInsensitive(Object value, SearchExecutionContext context) - Overrides:
termQueryCaseInsensitivein classMappedFieldType
-
termQuery
Description copied from class:MappedFieldTypeGenerates a query that will only match documents that contain the given value. The default implementation returns aTermQueryover the value bytes- Specified by:
termQueryin classMappedFieldType
-
termsQuery
public org.apache.lucene.search.Query termsQuery(Collection<?> values, SearchExecutionContext context) Description copied from class:MappedFieldTypeBuild a constant-scoring query that matches all values. The default implementation uses aConstantScoreQueryaround aBooleanQuerywhoseBooleanClause.Occur.SHOULDclauses are generated withMappedFieldType.termQuery(java.lang.Object, org.elasticsearch.index.query.SearchExecutionContext).- Overrides:
termsQueryin classMappedFieldType
-
wildcardQuery
public org.apache.lucene.search.Query wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context) - Overrides:
wildcardQueryin classAbstractScriptFieldType<StringFieldScript.LeafFactory>
-
normalizedWildcardQuery
public org.apache.lucene.search.Query normalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context) - Overrides:
normalizedWildcardQueryin classMappedFieldType
-