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,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject,Rewriteable<RescorerBuilder<RB>>
- Direct Known Subclasses:
QueryRescorerBuilder
public abstract class RescorerBuilder<RB extends RescorerBuilder<RB>> extends java.lang.Object implements NamedWriteable, org.elasticsearch.common.xcontent.ToXContentObject, Rewriteable<RescorerBuilder<RB>>
The abstract base builder for instances of
RescorerBuilder.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested 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 java.lang.IntegerwindowSize -
Constructor Summary
Constructors Modifier Constructor Description RescorerBuilder()Construct an empty RescoreBuilder.protectedRescorerBuilder(StreamInput in)Read from a stream. -
Method Summary
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(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)booleanequals(java.lang.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(org.elasticsearch.common.xcontent.XContentParser parser)java.lang.StringtoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)java.lang.IntegerwindowSize()RBwindowSize(int windowSize)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZE- See Also:
- Constant Field Values
-
windowSize
protected java.lang.Integer windowSize
-
-
Constructor Details
-
RescorerBuilder
public RescorerBuilder()Construct an empty RescoreBuilder. -
RescorerBuilder
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
doWriteTo
- Throws:
java.io.IOException
-
windowSize
-
windowSize
public java.lang.Integer windowSize() -
parseFromXContent
public static RescorerBuilder<?> parseFromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
doXContent
protected abstract void doXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
buildContext
Build the RescoreContext that will be used to actually execute the rescore against a particular shard.- Throws:
java.io.IOException
-
innerBuildContext
protected abstract RescoreContext innerBuildContext(int windowSize, QueryShardContext context) throws java.io.IOExceptionExtensions override this to build the context that they need for rescoring.- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-