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.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract RankCoordinatorContext
buildRankCoordinatorContext
(int size, int from) Generates a context used to perform global ranking on the coordinator.abstract RankShardContext
buildRankShardContext
(List<org.apache.lucene.search.Query> queries, int from) Generates a context used to execute required searches on the shard.protected abstract boolean
doEquals
(RankBuilder other) protected abstract int
protected abstract void
doWriteTo
(StreamOutput out) protected abstract void
doXContent
(XContentBuilder builder, ToXContent.Params params) final boolean
final int
hashCode()
toString()
final XContentBuilder
toXContent
(XContentBuilder builder, ToXContent.Params params) int
final void
writeTo
(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.xcontent.ToXContentObject
isFragment
Methods 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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
doWriteTo
- Throws:
IOException
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in 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
-