|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.action.support.broadcast.BroadcastOperationRequest
org.elasticsearch.action.count.CountRequest
public class CountRequest
A request to count the number of documents matching a specific query. Best created with
Requests.countRequest(String...)
.
The request requires the query source to be set either using query(org.elasticsearch.index.query.QueryBuilder)
,
or query(byte[])
.
CountResponse
,
Client.count(CountRequest)
,
Requests.countRequest(String...)
Field Summary | |
---|---|
static float |
DEFAULT_MIN_SCORE
|
protected java.lang.String |
queryHint
|
protected java.lang.String |
routing
|
Fields inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest |
---|
indices |
Constructor Summary | |
---|---|
CountRequest(java.lang.String... indices)
Constructs a new count request against the provided indices. |
Method Summary | |
---|---|
protected void |
beforeLocalFork()
|
CountRequest |
indices(java.lang.String... indices)
|
CountRequest |
listenerThreaded(boolean threadedListener)
Should the listener be called on a separate thread if needed. |
CountRequest |
minScore(float minScore)
The minimum score of the documents to include in the count. |
CountRequest |
operationThreading(BroadcastOperationThreading operationThreading)
Controls the operation threading model. |
CountRequest |
query(byte[] querySource)
The query source to execute. |
CountRequest |
query(byte[] querySource,
int offset,
int length,
boolean unsafe)
The query source to execute. |
CountRequest |
query(java.util.Map querySource)
The query source to execute in the form of a map. |
CountRequest |
query(QueryBuilder queryBuilder)
The query source to execute. |
CountRequest |
query(java.lang.String querySource)
The query source to execute. |
CountRequest |
query(XContentBuilder builder)
|
java.lang.String |
queryHint()
|
CountRequest |
queryHint(java.lang.String queryHint)
A query hint to optionally later be used when routing the request. |
CountRequest |
queryParserName(java.lang.String queryParserName)
The query parse name to use. |
void |
readFrom(StreamInput in)
|
java.lang.String |
routing()
A comma separated list of routing values to control the shards the search will be executed on. |
CountRequest |
routing(java.lang.String... routings)
The routing values to control the shards that the search will be executed on. |
CountRequest |
routing(java.lang.String routing)
A comma separated list of routing values to control the shards the search will be executed on. |
java.lang.String |
toString()
|
CountRequest |
types(java.lang.String... types)
The types of documents the query will run against. |
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest |
---|
indices, listenerThreaded, operationThreading, operationThreading |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float DEFAULT_MIN_SCORE
@Nullable protected java.lang.String queryHint
@Nullable protected java.lang.String routing
Constructor Detail |
---|
public CountRequest(java.lang.String... indices)
Method Detail |
---|
public ActionRequestValidationException validate()
validate
in interface ActionRequest
validate
in class BroadcastOperationRequest
public java.lang.String queryHint()
public CountRequest operationThreading(BroadcastOperationThreading operationThreading)
operationThreading
in class BroadcastOperationRequest
protected void beforeLocalFork()
beforeLocalFork
in class BroadcastOperationRequest
public CountRequest listenerThreaded(boolean threadedListener)
listenerThreaded
in interface ActionRequest
listenerThreaded
in class BroadcastOperationRequest
public CountRequest indices(java.lang.String... indices)
indices
in class BroadcastOperationRequest
public CountRequest queryHint(java.lang.String queryHint)
public CountRequest minScore(float minScore)
@Required public CountRequest query(QueryBuilder queryBuilder)
QueryBuilders
@Required public CountRequest query(java.util.Map querySource)
@Required public CountRequest query(XContentBuilder builder)
@Required public CountRequest query(java.lang.String querySource)
query(byte[])
or query(org.elasticsearch.index.query.QueryBuilder)
.
@Required public CountRequest query(byte[] querySource)
@Required public CountRequest query(byte[] querySource, int offset, int length, boolean unsafe)
public CountRequest queryParserName(java.lang.String queryParserName)
public CountRequest types(java.lang.String... types)
public java.lang.String routing()
public CountRequest routing(java.lang.String routing)
public CountRequest routing(java.lang.String... routings)
public void readFrom(StreamInput in) throws java.io.IOException
readFrom
in interface Streamable
readFrom
in class BroadcastOperationRequest
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
writeTo
in interface Streamable
writeTo
in class BroadcastOperationRequest
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |