Class Match
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<Expression>
org.elasticsearch.xpack.esql.core.expression.Expression
org.elasticsearch.xpack.esql.core.expression.function.Function
org.elasticsearch.xpack.esql.expression.function.fulltext.FullTextFunction
org.elasticsearch.xpack.esql.expression.function.fulltext.Match
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisPlanVerificationAware,PostOptimizationVerificationAware,TranslationAware,Resolvable,EvaluatorMapper,OptionalArgument,ExpressionScoreMapper
- Direct Known Subclasses:
MatchOperator
public class Match
extends FullTextFunction
implements OptionalArgument, PostOptimizationVerificationAware
Full text function that performs a
MatchQuery .-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
Expression.TypeResolutionNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
EvaluatorMapper.ToEvaluatorNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.score.ExpressionScoreMapper
ExpressionScoreMapper.ToScorerNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.capabilities.TranslationAware
TranslationAware.SingleValueTranslationAwareNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NamedWriteableRegistry.Entryprotected final Expression -
Constructor Summary
ConstructorsConstructorDescriptionMatch(Source source, Expression field, Expression matchQuery, Expression options) Match(Source source, Expression field, Expression matchQuery, Expression options, QueryBuilder queryBuilder) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfield()inthashCode()protected NodeInfo<? extends Expression> info()options()voidpostOptimizationVerification(Failures failures) Validates the implementing expression - discovered failures are reported to the givenFailuresclass.Returns the resulting query as an objectreplaceChildren(List<Expression> newChildren) replaceQueryBuilder(QueryBuilder queryBuilder) protected Expression.TypeResolutionResolves the type for the function parameters, as part of the type resolution for the functionprotected Querytranslate(TranslatorHandler handler) final voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.expression.function.fulltext.FullTextFunction
asQuery, dataType, functionType, nullable, postAnalysisPlanVerification, query, queryBuilder, resolveQuery, resolveType, toEvaluator, toScorer, translatableMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, functionName, nodeStringMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, canonicalize, childrenResolved, fold, foldable, propertiesToString, references, resolved, semanticEquals, semanticHash, toString, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, replaceChildrenSameSize, source, sourceLocation, sourceText, transformChildren, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
fold
-
Field Details
-
ENTRY
-
FIELD_DATA_TYPES
-
QUERY_DATA_TYPES
-
field
-
ALLOWED_OPTIONS
-
-
Constructor Details
-
Match
-
Match
public Match(Source source, Expression field, Expression matchQuery, Expression options, QueryBuilder queryBuilder)
-
-
Method Details
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
resolveParams
Description copied from class:FullTextFunctionResolves the type for the function parameters, as part of the type resolution for the function- Overrides:
resolveParamsin classFullTextFunction- Returns:
- type resolution for the function parameters
-
field
-
options
-
info
- Specified by:
infoin classNode<Expression>
-
replaceChildren
- Specified by:
replaceChildrenin classNode<Expression>
-
replaceQueryBuilder
- Specified by:
replaceQueryBuilderin classFullTextFunction
-
postOptimizationVerification
Description copied from interface:PostOptimizationVerificationAwareValidates the implementing expression - discovered failures are reported to the givenFailuresclass.Example: the
Bucketfunction, which produces buckets over a numerical or date field, based on a number of literal arguments needs to check if its arguments are all indeed literals. This is how this verification is performed:@Override public void postOptimizationVerification(Failures failures) { String operation = sourceText(); failures.add(isFoldable(buckets, operation, SECOND)) .add(from != null ? isFoldable(from, operation, THIRD) : null) .add(to != null ? isFoldable(to, operation, FOURTH) : null); }- Specified by:
postOptimizationVerificationin interfacePostOptimizationVerificationAware
-
queryAsObject
Description copied from class:FullTextFunctionReturns the resulting query as an object- Overrides:
queryAsObjectin classFullTextFunction- Returns:
- query expression as an object
-
translate
- Specified by:
translatein classFullTextFunction
-
equals
- Overrides:
equalsin classFullTextFunction
-
hashCode
public int hashCode()- Overrides:
hashCodein classFullTextFunction
-