org.elasticsearch.action.count
Class CountRequestBuilder

java.lang.Object
  extended by org.elasticsearch.action.support.BaseRequestBuilder<CountRequest,CountResponse>
      extended by org.elasticsearch.action.count.CountRequestBuilder
All Implemented Interfaces:
ActionRequestBuilder<CountRequest,CountResponse>

public class CountRequestBuilder
extends BaseRequestBuilder<CountRequest,CountResponse>

A count action request builder.


Field Summary
 
Fields inherited from class org.elasticsearch.action.support.BaseRequestBuilder
client, request
 
Constructor Summary
CountRequestBuilder(Client client)
           
 
Method Summary
protected  void doExecute(ActionListener<CountResponse> listener)
           
 CountRequestBuilder setIgnoreIndices(IgnoreIndices ignoreIndices)
          Specifies what type of requested indices to ignore.
 CountRequestBuilder setIndices(String... indices)
          Sets the indices the count query will run against.
 CountRequestBuilder setListenerThreaded(boolean threadedListener)
          Should the listener be called on a separate thread if needed.
 CountRequestBuilder setMinScore(float minScore)
          The minimum score of the documents to include in the count.
 CountRequestBuilder setOperationThreading(BroadcastOperationThreading operationThreading)
          Controls the operation threading model.
 CountRequestBuilder setQuery(byte[] querySource)
          The query source to execute.
 CountRequestBuilder setQuery(BytesReference querySource)
          The query source to execute.
 CountRequestBuilder setQuery(BytesReference querySource, boolean unsafe)
          The query source to execute.
 CountRequestBuilder setQuery(QueryBuilder queryBuilder)
          The query source to execute.
 CountRequestBuilder setQueryHint(String queryHint)
          A query hint to optionally later be used when routing the request.
 CountRequestBuilder setRouting(String... routing)
          The routing values to control the shards that the search will be executed on.
 CountRequestBuilder setRouting(String routing)
          A comma separated list of routing values to control the shards the search will be executed on.
 CountRequestBuilder setTypes(String... types)
          The types of documents the query will run against.
 
Methods inherited from class org.elasticsearch.action.support.BaseRequestBuilder
execute, execute, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountRequestBuilder

public CountRequestBuilder(Client client)
Method Detail

setIndices

public CountRequestBuilder setIndices(String... indices)
Sets the indices the count query will run against.


setTypes

public CountRequestBuilder setTypes(String... types)
The types of documents the query will run against. Defaults to all types.


setMinScore

public CountRequestBuilder setMinScore(float minScore)
The minimum score of the documents to include in the count. Defaults to -1 which means all documents will be included in the count.


setQueryHint

public CountRequestBuilder setQueryHint(String queryHint)
A query hint to optionally later be used when routing the request.


setRouting

public CountRequestBuilder setRouting(String routing)
A comma separated list of routing values to control the shards the search will be executed on.


setRouting

public CountRequestBuilder setRouting(String... routing)
The routing values to control the shards that the search will be executed on.


setQuery

public CountRequestBuilder setQuery(QueryBuilder queryBuilder)
The query source to execute.

See Also:
QueryBuilders

setQuery

public CountRequestBuilder setQuery(BytesReference querySource)
The query source to execute.

See Also:
QueryBuilders

setQuery

public CountRequestBuilder setQuery(BytesReference querySource,
                                    boolean unsafe)
The query source to execute.

See Also:
QueryBuilders

setQuery

public CountRequestBuilder setQuery(byte[] querySource)
The query source to execute.

See Also:
QueryBuilders

setOperationThreading

public CountRequestBuilder setOperationThreading(BroadcastOperationThreading operationThreading)
Controls the operation threading model.


setListenerThreaded

public CountRequestBuilder setListenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed.


setIgnoreIndices

public CountRequestBuilder setIgnoreIndices(IgnoreIndices ignoreIndices)
Specifies what type of requested indices to ignore. For example indices that don't exist.


doExecute

protected void doExecute(ActionListener<CountResponse> listener)
Specified by:
doExecute in class BaseRequestBuilder<CountRequest,CountResponse>


Copyright © 2009-2012. All Rights Reserved.