类 SubmitAsyncSearchRequest
java.lang.Object
org.easysearch.client.asyncsearch.SubmitAsyncSearchRequest
- 所有已实现的接口:
Validatable
public class SubmitAsyncSearchRequest extends java.lang.Object implements Validatable
A request to track asynchronously the progress of a search against one or more indices.
-
字段概要
字段 修饰符和类型 字段 说明 static longMIN_KEEP_ALIVE从接口继承的字段 org.easysearch.client.Validatable
EMPTY -
构造器概要
构造器 构造器 说明 SubmitAsyncSearchRequest(org.easysearch.search.builder.SearchSourceBuilder source, java.lang.String... indices)Creates a new request -
方法概要
修饰符和类型 方法 说明 booleanequals(java.lang.Object o)java.lang.BooleangetAllowPartialSearchResults()Gets if this request should allow partial results.java.lang.IntegergetBatchedReduceSize()Gets the number of shard results that should be reduced at once on the coordinating node.java.lang.String[]getIndices()Get the target indicesorg.easysearch.action.support.IndicesOptionsgetIndicesOptions()Get the indices Options.org.easysearch.common.unit.TimeValuegetKeepAlive()Get the amount of time after which the result will expire (defaults to 5 days).intgetMaxConcurrentShardRequests()Returns the number of shard requests that should be executed concurrently on a single node.java.lang.StringgetPreference()Get the preference to execute the search.java.lang.BooleangetRequestCache()Gets if this request should use the request cache or not, if set.java.lang.StringgetRouting()Get the routing value to control the shards that the search will be executed on.org.easysearch.search.builder.SearchSourceBuildergetSearchSource()Gets if the source of theSearchSourceBuilderinitially used on this request.org.easysearch.action.search.SearchTypegetSearchType()Get the search type to execute, defaults toSearchType.DEFAULT.org.easysearch.common.unit.TimeValuegetWaitForCompletionTimeout()Get the minimum time that the request should wait before returning a partial result (defaults to 1 second).inthashCode()java.lang.BooleanisKeepOnCompletion()Returns whether the resource resource should be kept on completion or failure (defaults to false).voidsetAllowPartialSearchResults(boolean allowPartialSearchResults)Sets if this request should allow partial results.voidsetBatchedReduceSize(int batchedReduceSize)Optional.voidsetIndicesOptions(org.easysearch.action.support.IndicesOptions indicesOptions)Specifies what type of requested indices to ignore and how to deal with indices wildcard expressions.voidsetKeepAlive(org.easysearch.common.unit.TimeValue keepAlive)Sets the amount of time after which the result will expire (defaults to 5 days).voidsetKeepOnCompletion(boolean keepOnCompletion)Determines if the resource should be kept on completion or failure (defaults to false).voidsetMaxConcurrentShardRequests(int maxConcurrentShardRequests)Sets the number of shard requests that should be executed concurrently on a single node.voidsetPreference(java.lang.String preference)Sets the preference to execute the search.voidsetRequestCache(java.lang.Boolean requestCache)Sets if this request should use the request cache or not, assuming that it can (for example, if "now" is used, it will never be cached).voidsetRouting(java.lang.String routing)Set the routing value to control the shards that the search will be executed on.voidsetRoutings(java.lang.String... routings)Set the routing values to control the shards that the search will be executed on.voidsetSearchType(org.easysearch.action.search.SearchType searchType)The search type to execute, defaults toSearchType.DEFAULT.voidsetWaitForCompletionTimeout(org.easysearch.common.unit.TimeValue waitForCompletionTimeout)Sets the minimum time that the request should wait before returning a partial result (defaults to 1 second).java.util.Optional<ValidationException>validate()Perform validation.从类继承的方法 java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
字段详细资料
-
MIN_KEEP_ALIVE
public static long MIN_KEEP_ALIVE
-
-
构造器详细资料
-
SubmitAsyncSearchRequest
public SubmitAsyncSearchRequest(org.easysearch.search.builder.SearchSourceBuilder source, java.lang.String... indices)Creates a new request
-
-
方法详细资料
-
getIndices
public java.lang.String[] getIndices()Get the target indices -
getWaitForCompletionTimeout
public org.easysearch.common.unit.TimeValue getWaitForCompletionTimeout()Get the minimum time that the request should wait before returning a partial result (defaults to 1 second). -
setWaitForCompletionTimeout
public void setWaitForCompletionTimeout(org.easysearch.common.unit.TimeValue waitForCompletionTimeout)Sets the minimum time that the request should wait before returning a partial result (defaults to 1 second). -
isKeepOnCompletion
public java.lang.Boolean isKeepOnCompletion()Returns whether the resource resource should be kept on completion or failure (defaults to false). -
setKeepOnCompletion
public void setKeepOnCompletion(boolean keepOnCompletion)Determines if the resource should be kept on completion or failure (defaults to false). -
getKeepAlive
public org.easysearch.common.unit.TimeValue getKeepAlive()Get the amount of time after which the result will expire (defaults to 5 days). -
setKeepAlive
public void setKeepAlive(org.easysearch.common.unit.TimeValue keepAlive)Sets the amount of time after which the result will expire (defaults to 5 days). -
setRouting
public void setRouting(java.lang.String routing)Set the routing value to control the shards that the search will be executed on. A comma separated list of routing values to control the shards the search will be executed on. -
setRoutings
public void setRoutings(java.lang.String... routings)Set the routing values to control the shards that the search will be executed on. -
getRouting
public java.lang.String getRouting()Get the routing value to control the shards that the search will be executed on. -
setPreference
public void setPreference(java.lang.String preference)Sets the preference to execute the search. 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. -
getPreference
public java.lang.String getPreference()Get the preference to execute the search. -
setIndicesOptions
public void setIndicesOptions(org.easysearch.action.support.IndicesOptions indicesOptions)Specifies what type of requested indices to ignore and how to deal with indices wildcard expressions. -
getIndicesOptions
public org.easysearch.action.support.IndicesOptions getIndicesOptions()Get the indices Options. -
setSearchType
public void setSearchType(org.easysearch.action.search.SearchType searchType)The search type to execute, defaults toSearchType.DEFAULT. -
getSearchType
public org.easysearch.action.search.SearchType getSearchType()Get the search type to execute, defaults toSearchType.DEFAULT. -
setAllowPartialSearchResults
public void setAllowPartialSearchResults(boolean allowPartialSearchResults)Sets if this request should allow partial results. (If method is not called, will default to the cluster level setting). -
getAllowPartialSearchResults
public java.lang.Boolean getAllowPartialSearchResults()Gets if this request should allow partial results. -
setBatchedReduceSize
public void setBatchedReduceSize(int batchedReduceSize)Optional. Sets the number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. Defaults to 5. -
getBatchedReduceSize
public java.lang.Integer getBatchedReduceSize()Gets the number of shard results that should be reduced at once on the coordinating node. Returnsnullif unset. -
setRequestCache
public void setRequestCache(java.lang.Boolean requestCache)Sets if this request should use the request cache or not, assuming that it can (for example, if "now" is used, it will never be cached). By default (if not set) this is turned on forSubmitAsyncSearchRequest. -
getRequestCache
public java.lang.Boolean getRequestCache()Gets if this request should use the request cache or not, if set. This defaults to `true` on the server side if unset in the client. -
getMaxConcurrentShardRequests
public int getMaxConcurrentShardRequests()Returns the number of shard requests that should be executed concurrently on a single node. The default is5. -
setMaxConcurrentShardRequests
public void setMaxConcurrentShardRequests(int maxConcurrentShardRequests)Sets the number of shard requests that should be executed concurrently on a single node. The default is5. -
getSearchSource
public org.easysearch.search.builder.SearchSourceBuilder getSearchSource()Gets if the source of theSearchSourceBuilderinitially used on this request. -
validate
从接口复制的说明:ValidatablePerform validation. This method does not have to be overridden in the event that no validation needs to be done, or the validation was done during object construction time. AValidationExceptionthat is not null is assumed to contain validation errors and will be thrown.- 指定者:
validate在接口中Validatable- 返回:
- An
OptionalValidationExceptionthat contains a list of validation errors.
-
equals
public boolean equals(java.lang.Object o)- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()- 覆盖:
hashCode在类中java.lang.Object
-