Class Rerank
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<LogicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<LogicalPlan>
org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
org.elasticsearch.xpack.esql.plan.logical.inference.InferencePlan<Rerank>
org.elasticsearch.xpack.esql.plan.logical.inference.Rerank
- All Implemented Interfaces:
NamedWriteable,Writeable,TelemetryAware,Resolvable,GeneratingPlan<InferencePlan<Rerank>>,SortAgnostic
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final NamedWriteableRegistry.Entrystatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionRerank(StreamInput in) Rerank(Source source, LogicalPlan child, Expression queryText, List<Alias> rerankFields) Rerank(Source source, LogicalPlan child, Expression inferenceId, Expression queryText, List<Alias> rerankFields, Attribute scoreAttribute) -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeSetThis very likely needs to be overridden forQueryPlan.references()to be correct when inheriting.static AttributeSetcomputeReferences(List<Alias> fields) booleanbooleaninthashCode()protected NodeInfo<? extends LogicalPlan> info()output()The ordered list of attributes (i.e.replaceChild(LogicalPlan newChild) taskType()withGeneratedNames(List<String> newNames) Create a new instance of this node with new outputAttributes using the given names.withInferenceId(Expression newInferenceId) withRerankFields(List<Alias> newRerankFields) withScoreAttribute(Attribute newScoreAttribute) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.inference.InferencePlan
inferenceId, withInferenceResolutionErrorMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, inputSet, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
analyzed, childrenResolved, optimized, preAnalyzed, resolved, setAnalyzed, setOptimized, setPreAnalyzedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods 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, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.plan.GeneratingPlan
checkNumberOfNewNamesMethods inherited from interface org.elasticsearch.xpack.esql.capabilities.TelemetryAware
telemetryLabel
-
Field Details
-
ENTRY
-
DEFAULT_INFERENCE_ID
- See Also:
-
INFERENCE_ID_OPTION_NAME
- See Also:
-
SCORE_COLUMN_OPTION_NAME
- See Also:
-
-
Constructor Details
-
Rerank
-
Rerank
public Rerank(Source source, LogicalPlan child, Expression inferenceId, Expression queryText, List<Alias> rerankFields, Attribute scoreAttribute) -
Rerank
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classInferencePlan<Rerank>- Throws:
IOException
-
queryText
-
rerankFields
-
scoreAttribute
-
taskType
- Specified by:
taskTypein classInferencePlan<Rerank>
-
withInferenceId
- Specified by:
withInferenceIdin classInferencePlan<Rerank>
-
withRerankFields
-
withScoreAttribute
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
replaceChild
- Specified by:
replaceChildin classUnaryPlan
-
computeReferences
Description copied from class:QueryPlanThis very likely needs to be overridden forQueryPlan.references()to be correct when inheriting. This can be called on unresolved plans and therefore must not rely on calls toQueryPlan.output().- Overrides:
computeReferencesin classQueryPlan<LogicalPlan>
-
generatedAttributes
- Specified by:
generatedAttributesin interfaceGeneratingPlan<InferencePlan<Rerank>>
-
withGeneratedNames
Description copied from interface:GeneratingPlanCreate a new instance of this node with new outputAttributes using the given names. If an output attribute already has the desired name, we continue using it; otherwise, we create a new attribute with a newNameId.- Specified by:
withGeneratedNamesin interfaceGeneratingPlan<InferencePlan<Rerank>>
-
computeReferences
-
expressionsResolved
public boolean expressionsResolved()- Overrides:
expressionsResolvedin classInferencePlan<Rerank>
-
info
- Specified by:
infoin classNode<LogicalPlan>
-
equals
- Overrides:
equalsin classInferencePlan<Rerank>
-
hashCode
public int hashCode()- Overrides:
hashCodein classInferencePlan<Rerank>
-
output
Description copied from class:QueryPlanThe ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results.
-