Module org.elasticsearch.xcore
Class SubmitAsyncSearchRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.xpack.core.search.action.SubmitAsyncSearchRequest
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
A request to track asynchronously the progress of a search against one or more indices.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionSubmitAsyncSearchRequest(String... indices) Creates a new requestSubmitAsyncSearchRequest(SearchSourceBuilder source, String... indices) Creates a new request -
Method Summary
Modifier and TypeMethodDescriptionbooleanintorg.elasticsearch.core.TimeValueReturns the underlyingSearchRequest.org.elasticsearch.core.TimeValueinthashCode()booleanReturns whether network round-trips should be minimized when executing cross-cluster search requests.booleansetBatchedReduceSize(int size) Sets the number of shard results that should be returned to notify search progress (default to 5).voidsetCcsMinimizeRoundtrips(boolean ccsMinimizeRoundtrips) Sets whether network round-trips should be minimized when executing cross-cluster search requests.setKeepAlive(org.elasticsearch.core.TimeValue keepAlive) Sets the amount of time after which the result will expire (defaults to 5 days).setKeepOnCompletion(boolean value) Should the resource be kept on completion or failure (defaults to false).setWaitForCompletionTimeout(org.elasticsearch.core.TimeValue waitForCompletionTimeout) Sets the minimum time that the request should wait before returning a partial result (defaults to 1 second).validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
getDescription, setParentTask
-
Field Details
-
MIN_KEEP_ALIVE
public static final long MIN_KEEP_ALIVE
-
-
Constructor Details
-
SubmitAsyncSearchRequest
Creates a new request -
SubmitAsyncSearchRequest
Creates a new request -
SubmitAsyncSearchRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-
setBatchedReduceSize
Sets the number of shard results that should be returned to notify search progress (default to 5). -
getBatchReduceSize
public int getBatchReduceSize() -
isCcsMinimizeRoundtrips
public boolean isCcsMinimizeRoundtrips()Returns whether network round-trips should be minimized when executing cross-cluster search requests. Defaults tofalse. -
setCcsMinimizeRoundtrips
public void setCcsMinimizeRoundtrips(boolean ccsMinimizeRoundtrips) Sets whether network round-trips should be minimized when executing cross-cluster search requests. Defaults tofalse.WARNING: The progress and partial responses of searches executed on remote clusters will not be available during the search if
ccsMinimizeRoundtripsis enabled. -
setWaitForCompletionTimeout
public SubmitAsyncSearchRequest setWaitForCompletionTimeout(org.elasticsearch.core.TimeValue waitForCompletionTimeout) Sets the minimum time that the request should wait before returning a partial result (defaults to 1 second). -
getWaitForCompletionTimeout
public org.elasticsearch.core.TimeValue getWaitForCompletionTimeout() -
setKeepAlive
Sets the amount of time after which the result will expire (defaults to 5 days). -
getKeepAlive
public org.elasticsearch.core.TimeValue getKeepAlive() -
getSearchRequest
Returns the underlyingSearchRequest. -
setKeepOnCompletion
Should the resource be kept on completion or failure (defaults to false). -
isKeepOnCompletion
public boolean isKeepOnCompletion() -
validate
- Specified by:
validatein classActionRequest
-
createTask
-
equals
-
hashCode
public int hashCode()
-