java.lang.Object
org.elasticsearch.search.rank.RankBuilder
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,ToXContent,ToXContentObject
public abstract class RankBuilder
extends Object
implements VersionedNamedWriteable, ToXContentObject
RankContextBuilder is used as a base class to manage input, parsing,
and subsequent generation of appropriate contexts for handling searches that
require multiple queries for global rank relevance.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract RankCoordinatorContextbuildRankCoordinatorContext(int size, int from) Generates a context used to perform global ranking on the coordinator.abstract RankShardContextbuildRankShardContext(List<org.apache.lucene.search.Query> queries, int from) Generates a context used to execute required searches on the shard.protected abstract booleandoEquals(RankBuilder other) protected abstract intprotected abstract voiddoWriteTo(StreamOutput out) protected abstract voiddoXContent(XContentBuilder builder, ToXContent.Params params) final booleanfinal inthashCode()toString()final XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params) intfinal voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
getMinimalSupportedVersion, getWriteableName
-
Field Details
-
WINDOW_SIZE_FIELD
-
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZE- See Also:
-
-
Constructor Details
-
RankBuilder
public RankBuilder(int windowSize) -
RankBuilder
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
doWriteTo
- Throws:
IOException
-
toXContent
public final 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
-
windowSize
public int windowSize() -
buildRankShardContext
public abstract RankShardContext buildRankShardContext(List<org.apache.lucene.search.Query> queries, int from) Generates a context used to execute required searches on the shard. -
buildRankCoordinatorContext
Generates a context used to perform global ranking on the coordinator. -
equals
-
doEquals
-
hashCode
public final int hashCode() -
doHashCode
protected abstract int doHashCode() -
toString
-