类 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.
  • 方法概要

    修饰符和类型 方法 说明
    boolean equals​(java.lang.Object o)  
    int hashCode()  
    java.lang.String[] indices()  
    CountRequest indices​(java.lang.String... indices)
    Sets the indices the count will be executed on.
    org.easysearch.action.support.IndicesOptions indicesOptions()  
    CountRequest indicesOptions​(org.easysearch.action.support.IndicesOptions indicesOptions)
    Returns the indices options used to resolve indices.
    java.lang.Float minScore()  
    CountRequest minScore​(java.lang.Float minScore)  
    java.lang.String preference()  
    CountRequest preference​(java.lang.String preference)
    Sets the preference to execute the count.
    org.easysearch.index.query.QueryBuilder query()  
    CountRequest query​(org.easysearch.index.query.QueryBuilder query)
    Sets the query to execute for this count request.
    java.lang.String routing()  
    CountRequest routing​(java.lang.String routing)
    The routing values to control the shards that the search will be executed on.
    CountRequest routing​(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.SearchSourceBuilder source()
    已过时。
    The count api only supports a query.
    CountRequest source​(org.easysearch.search.builder.SearchSourceBuilder searchSourceBuilder)
    已过时。
    The count api only supports a query.
    int terminateAfter()  
    CountRequest terminateAfter​(int terminateAfter)  
    org.easysearch.common.xcontent.XContentBuilder toXContent​(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.
    CountRequest types​(java.lang.String... types)
    已过时。
    Types are in the process of being removed.
    org.easysearch.action.ActionRequestValidationException validate()  

    从类继承的方法 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. Use CountRequest(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

      public CountRequest indices​(java.lang.String... 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. Use query(QueryBuilder) instead.
      The source of the count request.
    • query

      public CountRequest query​(org.easysearch.index.query.QueryBuilder query)
      Sets the query to execute for this count request.
    • types

      @Deprecated public CountRequest types​(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.
      The document types to execute the count against. Defaults to be executed against all types.
    • routing

      public CountRequest routing​(java.lang.String routing)
      The routing values to control the shards that the search will be executed on.
    • routing

      public CountRequest routing​(java.lang.String... routings)
      A comma separated list of routing values to control the shards the count will be executed on.
    • indicesOptions

      public CountRequest indicesOptions​(org.easysearch.action.support.IndicesOptions 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

      public CountRequest preference​(java.lang.String preference)
      Sets the preference to execute the count. Defaults to randomize across shards. Can be set to _local to 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

      public CountRequest minScore​(java.lang.Float minScore)
    • terminateAfter

      public int terminateAfter()
    • terminateAfter

      public CountRequest terminateAfter​(int 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. Use query() instead.
      返回:
      the source builder
    • query

      public org.easysearch.index.query.QueryBuilder query()
      返回:
      The provided query to execute with the count request or null if 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