NamedWriteable, Writeable, ToXContent, ToXContentFragmentDecayFunctionBuilder, FieldValueFactorFunctionBuilder, RandomScoreFunctionBuilder, ScriptScoreFunctionBuilder, WeightBuilderpublic abstract class ScoreFunctionBuilder<FB extends ScoreFunctionBuilder<FB>> extends java.lang.Object implements ToXContentFragment, NamedWriteable
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>EMPTY_PARAMS| Constructor | Description |
|---|---|
ScoreFunctionBuilder() |
Standard empty constructor.
|
ScoreFunctionBuilder(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract boolean |
doEquals(FB functionBuilder) |
Check that two instances of the same subclass of ScoreFunctionBuilder are equal.
|
protected abstract int |
doHashCode() |
Hashcode for fields defined in this subclass of ScoreFunctionBuilder.
|
protected abstract ScoreFunction |
doToFunction(QueryShardContext context) |
Build the Lucene ScoreFunction for this builder.
|
protected abstract void |
doWriteTo(StreamOutput out) |
Write the subclass's components into the stream.
|
protected abstract void |
doXContent(XContentBuilder builder,
ToXContent.Params params) |
Convert this subclass's data into XContent.
|
boolean |
equals(java.lang.Object obj) |
|
abstract java.lang.String |
getName() |
The name of this score function.
|
java.lang.Float |
getWeight() |
The weight applied to the function before combining.
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
FB |
setWeight(float weight) |
Set the weight applied to the function before combining.
|
ScoreFunction |
toFunction(QueryShardContext context) |
Called on a data node, converts this ScoreFunctionBuilder into its corresponding Lucene function object.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic ScoreFunctionBuilder()
public ScoreFunctionBuilder(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic final void writeTo(StreamOutput out) throws java.io.IOException
Writeableprotected abstract void doWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic abstract java.lang.String getName()
public final FB setWeight(float weight)
public final java.lang.Float getWeight()
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionprotected abstract void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionpublic final java.lang.String getWriteableName()
NamedWriteablegetWriteableName in interface NamedWriteablepublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected abstract boolean doEquals(FB functionBuilder)
public final int hashCode()
hashCode in class java.lang.Objectprotected abstract int doHashCode()
public final ScoreFunction toFunction(QueryShardContext context) throws java.io.IOException
java.io.IOExceptionprotected abstract ScoreFunction doToFunction(QueryShardContext context) throws java.io.IOException
java.io.IOException