Package org.elasticsearch.search.rescore
Class RescorerBuilder<RB extends RescorerBuilder<RB>>
- java.lang.Object
-
- org.elasticsearch.search.rescore.RescorerBuilder<RB>
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentObject,Rewriteable<RescorerBuilder<RB>>
- Direct Known Subclasses:
QueryRescorerBuilder
public abstract class RescorerBuilder<RB extends RescorerBuilder<RB>> extends Object implements NamedWriteable, ToXContentObject, Rewriteable<RescorerBuilder<RB>>
The abstract base builder for instances ofRescorerBuilder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_WINDOW_SIZEprotected IntegerwindowSize-
Fields inherited from interface org.elasticsearch.index.query.Rewriteable
MAX_REWRITE_ROUNDS
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description RescorerBuilder()Construct an empty RescoreBuilder.protectedRescorerBuilder(StreamInput in)Read from a stream.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RescoreContextbuildContext(QueryShardContext context)Build the RescoreContext that will be used to actually execute the rescore against a particular shard.protected abstract voiddoWriteTo(StreamOutput out)protected abstract voiddoXContent(XContentBuilder builder, ToXContent.Params params)booleanequals(Object obj)inthashCode()protected abstract RescoreContextinnerBuildContext(int windowSize, QueryShardContext context)Extensions override this to build the context that they need for rescoring.static RescorerBuilder<?>parseFromXContent(XContentParser parser)StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)IntegerwindowSize()RBwindowSize(int windowSize)voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.index.query.Rewriteable
rewrite
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZE
- See Also:
- Constant Field Values
-
windowSize
protected Integer windowSize
-
-
Constructor Detail
-
RescorerBuilder
public RescorerBuilder()
Construct an empty RescoreBuilder.
-
RescorerBuilder
protected RescorerBuilder(StreamInput in) throws IOException
Read from a stream.- Throws:
IOException
-
-
Method Detail
-
writeTo
public final void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
doWriteTo
protected abstract void doWriteTo(StreamOutput out) throws IOException
- Throws:
IOException
-
windowSize
public RB windowSize(int windowSize)
-
windowSize
public Integer windowSize()
-
parseFromXContent
public static RescorerBuilder<?> parseFromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
doXContent
protected abstract void doXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Throws:
IOException
-
buildContext
public final RescoreContext buildContext(QueryShardContext context) throws IOException
Build the RescoreContext that will be used to actually execute the rescore against a particular shard.- Throws:
IOException
-
innerBuildContext
protected abstract RescoreContext innerBuildContext(int windowSize, QueryShardContext context) throws IOException
Extensions override this to build the context that they need for rescoring.- Throws:
IOException
-
-