Class MMRExec
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan
org.elasticsearch.xpack.esql.plan.physical.UnaryExec
org.elasticsearch.xpack.esql.plan.physical.MMRExec
- All Implemented Interfaces:
NamedWriteable,Writeable
Physical plan for the MMR command.
MMR performs result diversification on incoming results using maximum marginal relevance.
The input is a set of limited rows, where at least one field is a dense vector to use for vector comparison.
The output is a reduced set of results, in the same order as the input, but "diversified" to be results that are semantically
diverse from each other within the input set.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionMMRExec(Source source, PhysicalPlan child, Attribute diversifyField, Expression limit, Expression queryVectorExpression, MapExpression options) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected NodeInfo<? extends PhysicalPlan> info()Normally, you want to use one of the staticcreatemethods to implement this.floatlambda()limit()intoptions()replaceChild(PhysicalPlan newChild) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.physical.UnaryExec
child, inputSet, output, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, computeReferences, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
MMRExec
public MMRExec(Source source, PhysicalPlan child, Attribute diversifyField, Expression limit, @Nullable Expression queryVectorExpression, @Nullable MapExpression options)
-
-
Method Details
-
diversifyField
-
limit
-
options
-
replaceChild
- Specified by:
replaceChildin classUnaryExec
-
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods to implement this.For
QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations likeQueryPlan#transformExpressionsOnly(Function)will not have an effect.- Specified by:
infoin classNode<PhysicalPlan>
-
writeTo
- Throws:
IOException
-
getWriteableName
-
equals
-
hashCode
public int hashCode() -
queryVector
-
lambda
public float lambda() -
limitValue
public int limitValue()
-