All Implemented Interfaces:
NamedWriteable, Writeable

public class MMRExec extends UnaryExec
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.
  • Constructor Details

  • Method Details

    • diversifyField

      public Attribute diversifyField()
    • limit

      public Expression limit()
    • options

      public MapExpression options()
    • replaceChild

      public UnaryExec replaceChild(PhysicalPlan newChild)
      Specified by:
      replaceChild in class UnaryExec
    • info

      protected NodeInfo<? extends PhysicalPlan> info()
      Description copied from class: Node
      Normally, you want to use one of the static create methods 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 like QueryPlan#transformExpressionsOnly(Function) will not have an effect.

      Specified by:
      info in class Node<PhysicalPlan>
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class UnaryExec
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UnaryExec
    • queryVector

      public VectorData queryVector()
    • lambda

      public float lambda()
    • limitValue

      public int limitValue()