Module org.elasticsearch.compute
Record Class MMROperator.Factory
java.lang.Object
java.lang.Record
org.elasticsearch.compute.operator.MMROperator.Factory
- Record Components:
diversificationField- the name of the diversification fielddiversificationFieldChannel- the channel of the diversification fieldlimit- the total number of results to emitqueryVector- the (optional) query vector data for comparisonlambda- the (optional) lambda value for the MMR diversification
- All Implemented Interfaces:
Describable,Operator.OperatorFactory
- Enclosing class:
MMROperator
public static record MMROperator.Factory(String diversificationField, int diversificationFieldChannel, int limit, VectorData queryVector, float lambda)
extends Record
implements Operator.OperatorFactory
Factor creation for the MMR Operator
-
Constructor Summary
ConstructorsConstructorDescriptionFactory(String diversificationField, int diversificationFieldChannel, int limit, VectorData queryVector, float lambda) Creates an instance of aFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()Returns a description of the component.Returns the value of thediversificationFieldrecord component.intReturns the value of thediversificationFieldChannelrecord component.final booleanIndicates whether some other object is "equal to" this one.get(DriverContext driverContext) Creates a new intermediate operator.final inthashCode()Returns a hash code value for this object.floatlambda()Returns the value of thelambdarecord component.intlimit()Returns the value of thelimitrecord component.Returns the value of thequeryVectorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Factory
public Factory(String diversificationField, int diversificationFieldChannel, int limit, @Nullable VectorData queryVector, float lambda) Creates an instance of aFactoryrecord class.- Parameters:
diversificationField- the value for thediversificationFieldrecord componentdiversificationFieldChannel- the value for thediversificationFieldChannelrecord componentlimit- the value for thelimitrecord componentqueryVector- the value for thequeryVectorrecord componentlambda- the value for thelambdarecord component
-
-
Method Details
-
get
Description copied from interface:Operator.OperatorFactoryCreates a new intermediate operator.- Specified by:
getin interfaceOperator.OperatorFactory
-
describe
Description copied from interface:DescribableReturns a description of the component. This description can be more specific than Object::toString.- Specified by:
describein interfaceDescribable- Returns:
- the description
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
diversificationField
Returns the value of thediversificationFieldrecord component.- Returns:
- the value of the
diversificationFieldrecord component
-
diversificationFieldChannel
public int diversificationFieldChannel()Returns the value of thediversificationFieldChannelrecord component.- Returns:
- the value of the
diversificationFieldChannelrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
queryVector
Returns the value of thequeryVectorrecord component.- Returns:
- the value of the
queryVectorrecord component
-
lambda
public float lambda()Returns the value of thelambdarecord component.- Returns:
- the value of the
lambdarecord component
-