类 CountRequest
java.lang.Object
org.easysearch.transport.TransportMessage
org.easysearch.transport.TransportRequest
org.easysearch.action.ActionRequest
org.easysearch.client.core.CountRequest
- 所有已实现的接口:
org.easysearch.action.IndicesRequest,org.easysearch.action.IndicesRequest.Replaceable,org.easysearch.common.io.stream.Writeable,org.easysearch.common.xcontent.ToXContent,org.easysearch.common.xcontent.ToXContentObject,org.easysearch.tasks.TaskAwareRequest
public final class CountRequest
extends org.easysearch.action.ActionRequest
implements org.easysearch.action.IndicesRequest.Replaceable, org.easysearch.common.xcontent.ToXContentObject
Encapsulates a request to _count API against one, several or all indices.
-
嵌套类概要
从类继承的嵌套类/接口 org.easysearch.transport.TransportRequest
org.easysearch.transport.TransportRequest.Empty从接口继承的嵌套类/接口 org.easysearch.action.IndicesRequest
org.easysearch.action.IndicesRequest.Replaceable从接口继承的嵌套类/接口 org.easysearch.common.xcontent.ToXContent
org.easysearch.common.xcontent.ToXContent.DelegatingMapParams, org.easysearch.common.xcontent.ToXContent.MapParams, org.easysearch.common.xcontent.ToXContent.Params从接口继承的嵌套类/接口 org.easysearch.common.io.stream.Writeable
org.easysearch.common.io.stream.Writeable.Reader<V extends java.lang.Object>, org.easysearch.common.io.stream.Writeable.Writer<V extends java.lang.Object> -
字段概要
从接口继承的字段 org.easysearch.common.xcontent.ToXContent
EMPTY_PARAMS -
构造器概要
构造器 构造器 说明 CountRequest()CountRequest(java.lang.String... indices)Constructs a new count request against the indices.CountRequest(java.lang.String[] indices, org.easysearch.index.query.QueryBuilder query)Constructs a new search request against the provided indices with the given query.CountRequest(java.lang.String[] indices, org.easysearch.search.builder.SearchSourceBuilder searchSourceBuilder)已过时。The count api only supports a query. -
方法概要
修饰符和类型 方法 说明 booleanequals(java.lang.Object o)inthashCode()java.lang.String[]indices()CountRequestindices(java.lang.String... indices)Sets the indices the count will be executed on.org.easysearch.action.support.IndicesOptionsindicesOptions()CountRequestindicesOptions(org.easysearch.action.support.IndicesOptions indicesOptions)Returns the indices options used to resolve indices.java.lang.FloatminScore()CountRequestminScore(java.lang.Float minScore)java.lang.Stringpreference()CountRequestpreference(java.lang.String preference)Sets the preference to execute the count.org.easysearch.index.query.QueryBuilderquery()CountRequestquery(org.easysearch.index.query.QueryBuilder query)Sets the query to execute for this count request.java.lang.Stringrouting()CountRequestrouting(java.lang.String routing)The routing values to control the shards that the search will be executed on.CountRequestrouting(java.lang.String... routings)A comma separated list of routing values to control the shards the count will be executed on.org.easysearch.search.builder.SearchSourceBuildersource()已过时。The count api only supports a query.CountRequestsource(org.easysearch.search.builder.SearchSourceBuilder searchSourceBuilder)已过时。The count api only supports a query.intterminateAfter()CountRequestterminateAfter(int terminateAfter)org.easysearch.common.xcontent.XContentBuildertoXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params)java.lang.String[]types()已过时。Types are in the process of being removed.CountRequesttypes(java.lang.String... types)已过时。Types are in the process of being removed.org.easysearch.action.ActionRequestValidationExceptionvalidate()从类继承的方法 org.easysearch.action.ActionRequest
getShouldStoreResult, writeTo从类继承的方法 org.easysearch.transport.TransportRequest
getParentTask, setParentTask从类继承的方法 org.easysearch.transport.TransportMessage
remoteAddress, remoteAddress从类继承的方法 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.easysearch.action.IndicesRequest
includeDataStreams从接口继承的方法 org.easysearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask从接口继承的方法 org.easysearch.common.xcontent.ToXContentObject
isFragment
-
构造器详细资料
-
CountRequest
public CountRequest() -
CountRequest
public CountRequest(java.lang.String... indices)Constructs a new count request against the indices. No indices provided here means that count will execute on all indices. -
CountRequest
@Deprecated public CountRequest(java.lang.String[] indices, org.easysearch.search.builder.SearchSourceBuilder searchSourceBuilder)已过时。The count api only supports a query. UseCountRequest(String[], QueryBuilder)instead.Constructs a new search request against the provided indices with the given search source. -
CountRequest
public CountRequest(java.lang.String[] indices, org.easysearch.index.query.QueryBuilder query)Constructs a new search request against the provided indices with the given query.
-
-
方法详细资料
-
validate
public org.easysearch.action.ActionRequestValidationException validate()- 指定者:
validate在类中org.easysearch.action.ActionRequest
-
indices
Sets the indices the count will be executed on.- 指定者:
indices在接口中org.easysearch.action.IndicesRequest.Replaceable
-
source
@Deprecated public CountRequest source(org.easysearch.search.builder.SearchSourceBuilder searchSourceBuilder)已过时。The count api only supports a query. Usequery(QueryBuilder)instead.The source of the count request. -
query
Sets the query to execute for this count request. -
types
已过时。Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document.The document types to execute the count against. Defaults to be executed against all types. -
routing
The routing values to control the shards that the search will be executed on. -
routing
A comma separated list of routing values to control the shards the count will be executed on. -
indicesOptions
Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.- 另请参阅:
IndicesOptions
-
preference
Sets the preference to execute the count. Defaults to randomize across shards. Can be set to_localto prefer local shards or a custom value, which guarantees that the same order will be used across different requests. -
indicesOptions
public org.easysearch.action.support.IndicesOptions indicesOptions()- 指定者:
indicesOptions在接口中org.easysearch.action.IndicesRequest
-
routing
public java.lang.String routing() -
preference
public java.lang.String preference() -
indices
public java.lang.String[] indices()- 指定者:
indices在接口中org.easysearch.action.IndicesRequest
-
minScore
public java.lang.Float minScore() -
minScore
-
terminateAfter
public int terminateAfter() -
terminateAfter
-
types
@Deprecated public java.lang.String[] types()已过时。Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document. -
source
@Deprecated public org.easysearch.search.builder.SearchSourceBuilder source()已过时。The count api only supports a query. Usequery()instead.- 返回:
- the source builder
-
query
public org.easysearch.index.query.QueryBuilder query()- 返回:
- The provided query to execute with the count request or
nullif no query was provided.
-
toXContent
public org.easysearch.common.xcontent.XContentBuilder toXContent(org.easysearch.common.xcontent.XContentBuilder builder, org.easysearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- 指定者:
toXContent在接口中org.easysearch.common.xcontent.ToXContent- 抛出:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()- 覆盖:
hashCode在类中java.lang.Object
-