Module org.elasticsearch.server
Class FieldValueFactorFunctionBuilder
java.lang.Object
org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
org.elasticsearch.index.query.functionscore.FieldValueFactorFunctionBuilder
- All Implemented Interfaces:
- NamedWriteable,- VersionedNamedWriteable,- Writeable,- ToXContent,- ToXContentFragment
public class FieldValueFactorFunctionBuilder
extends ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
Builder to construct 
field_value_factor functions for a function
 score query.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final floatstatic final FieldValueFactorFunction.Modifierstatic final StringFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleandoEquals(FieldValueFactorFunctionBuilder functionBuilder) Check that two instances of the same subclass of ScoreFunctionBuilder are equal.protected intHashcode for fields defined in this subclass of ScoreFunctionBuilder.protected ScoreFunctiondoToFunction(SearchExecutionContext context) Build the Lucene ScoreFunction for this builder.protected voiddoWriteTo(StreamOutput out) Write the subclass's components into the stream.voiddoXContent(XContentBuilder builder, ToXContent.Params params) Convert this subclass's data into XContent.floatfactor()factor(float boostFactor) fromXContent(XContentParser parser) The minimal version of the recipient this object can be sent togetName()The name of this score function.missing()missing(double missing) Value used instead of the field value for documents that don't have that field defined.modifier()modifier(FieldValueFactorFunction.Modifier modifier) Methods inherited from class org.elasticsearch.index.query.functionscore.ScoreFunctionBuilderequals, getWeight, getWriteableName, hashCode, setWeight, toFunction, toXContent, writeToMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
NAME- See Also:
 
- 
DEFAULT_MODIFIER
- 
DEFAULT_FACTORpublic static final float DEFAULT_FACTOR- See Also:
 
 
- 
- 
Constructor Details- 
FieldValueFactorFunctionBuilder
- 
FieldValueFactorFunctionBuilderRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
doWriteToDescription copied from class:ScoreFunctionBuilderWrite the subclass's components into the stream.- Specified by:
- doWriteToin class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
- Throws:
- IOException
 
- 
getNameDescription copied from class:ScoreFunctionBuilderThe name of this score function.- Specified by:
- getNamein class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
 
- 
fieldName
- 
factor
- 
factorpublic float factor()
- 
missingValue used instead of the field value for documents that don't have that field defined.
- 
missing
- 
modifier
- 
modifier
- 
doXContentDescription copied from class:ScoreFunctionBuilderConvert this subclass's data into XContent.- Specified by:
- doXContentin class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
- Throws:
- IOException
 
- 
doEqualsDescription copied from class:ScoreFunctionBuilderCheck that two instances of the same subclass of ScoreFunctionBuilder are equal. Implementers don't need to check any fields in ScoreFunctionBuilder, just fields that they define.- Specified by:
- doEqualsin class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
 
- 
doHashCodeprotected int doHashCode()Description copied from class:ScoreFunctionBuilderHashcode for fields defined in this subclass of ScoreFunctionBuilder. Implementers should ignore fields defined in ScoreFunctionBuilder because they will already be in the hashCode.- Specified by:
- doHashCodein class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
 
- 
getMinimalSupportedVersionDescription copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to
- 
doToFunctionDescription copied from class:ScoreFunctionBuilderBuild the Lucene ScoreFunction for this builder. Implementers should ignore things defined in ScoreFunctionBuilder like weight as they will be handled by the function that calls this one.- Specified by:
- doToFunctionin class- ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
 
- 
fromXContentpublic static FieldValueFactorFunctionBuilder fromXContent(XContentParser parser) throws IOException, ParsingException - Throws:
- IOException
- ParsingException
 
 
-