public class FieldValueFactorFunctionBuilder extends ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
field_value_factor
functions for a function
score query.ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_FACTOR |
static FieldValueFactorFunction.Modifier |
DEFAULT_MODIFIER |
static java.lang.String |
NAME |
EMPTY_PARAMS
Constructor and Description |
---|
FieldValueFactorFunctionBuilder(StreamInput in)
Read from a stream.
|
FieldValueFactorFunctionBuilder(java.lang.String fieldName) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doEquals(FieldValueFactorFunctionBuilder functionBuilder)
Check that two instances of the same subclass of ScoreFunctionBuilder are equal.
|
protected int |
doHashCode()
Hashcode for fields defined in this subclass of ScoreFunctionBuilder.
|
protected ScoreFunction |
doToFunction(QueryShardContext context)
Build the Lucene ScoreFunction for this builder.
|
protected void |
doWriteTo(StreamOutput out)
Write the subclass's components into the stream.
|
void |
doXContent(XContentBuilder builder,
ToXContent.Params params)
Convert this subclass's data into XContent.
|
float |
factor() |
FieldValueFactorFunctionBuilder |
factor(float boostFactor) |
java.lang.String |
fieldName() |
static FieldValueFactorFunctionBuilder |
fromXContent(QueryParseContext parseContext) |
java.lang.String |
getName()
The name of this score function.
|
java.lang.Double |
missing() |
FieldValueFactorFunctionBuilder |
missing(double missing)
Value used instead of the field value for documents that don't have that field defined.
|
FieldValueFactorFunction.Modifier |
modifier() |
FieldValueFactorFunctionBuilder |
modifier(FieldValueFactorFunction.Modifier modifier) |
equals, getWeight, getWriteableName, hashCode, setWeight, toFunction, toXContent, writeTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
public static final java.lang.String NAME
public static final FieldValueFactorFunction.Modifier DEFAULT_MODIFIER
public static final float DEFAULT_FACTOR
public FieldValueFactorFunctionBuilder(java.lang.String fieldName)
public FieldValueFactorFunctionBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
protected void doWriteTo(StreamOutput out) throws java.io.IOException
ScoreFunctionBuilder
doWriteTo
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
java.io.IOException
public java.lang.String getName()
ScoreFunctionBuilder
getName
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
public java.lang.String fieldName()
public FieldValueFactorFunctionBuilder factor(float boostFactor)
public float factor()
public FieldValueFactorFunctionBuilder missing(double missing)
public java.lang.Double missing()
public FieldValueFactorFunctionBuilder modifier(FieldValueFactorFunction.Modifier modifier)
public FieldValueFactorFunction.Modifier modifier()
public void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
ScoreFunctionBuilder
doXContent
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
java.io.IOException
protected boolean doEquals(FieldValueFactorFunctionBuilder functionBuilder)
ScoreFunctionBuilder
doEquals
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
protected int doHashCode()
ScoreFunctionBuilder
doHashCode
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
protected ScoreFunction doToFunction(QueryShardContext context)
ScoreFunctionBuilder
doToFunction
in class ScoreFunctionBuilder<FieldValueFactorFunctionBuilder>
public static FieldValueFactorFunctionBuilder fromXContent(QueryParseContext parseContext) throws java.io.IOException, ParsingException
java.io.IOException
ParsingException