Class SearchModelsRequest.Builder
- All Implemented Interfaces:
CopyableBuilder<SearchModelsRequest.Builder,,SearchModelsRequest> MutableBuilder<SearchModelsRequest.Builder,,SearchModelsRequest> ObjectBuilder<SearchModelsRequest>
- Enclosing class:
SearchModelsRequest
SearchModelsRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowNoIndices(Boolean value) Whether to ignore if a wildcard indexes expression resolves into no concrete indexes.allowPartialSearchResults(Boolean value) Indicate if an error should be returned if there is a partial search failure or timeout.The analyzer to use for the query string.analyzeWildcard(Boolean value) Specify whether wildcard and prefix queries should be analyzed.batchedReduceSize(Integer value) The number of shard results that should be reduced at once on the coordinating node.build()Builds aSearchModelsRequest.ccsMinimizeRoundtrips(Boolean value) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.copy()Create a new builderCopyableBuilderthat is a copy of this one.defaultOperator(Operator value) The default operator for query string query (AND or OR).The field to use as default where no field prefix is given in the query string.docvalueFields(String value, String... values) A comma-separated list of fields to return as the docvalue representation of a field for each hit.docvalueFields(List<String> list) A comma-separated list of fields to return as the docvalue representation of a field for each hit.expandWildcards(List<ExpandWildcard> list) Whether to expand wildcard expression to concrete indexes that are open, closed or both.expandWildcards(ExpandWildcard value, ExpandWildcard... values) Whether to expand wildcard expression to concrete indexes that are open, closed or both.Specify whether to return detailed information about score computation as part of a hit.Starting offset.ignoreThrottled(Boolean value) Whether specified concrete, expanded or aliased indexes should be ignored when throttled.ignoreUnavailable(Boolean value) Whether specified concrete indexes should be ignored when unavailable (missing or closed).Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.The number of concurrent shard requests per node this search executes concurrently.preference(String value) Specify the node or shard the operation should be performed on.preFilterShardSize(Integer value) Threshold that enforces a pre-filter round-trip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold.Query in the Lucene query string syntax.requestCache(Boolean value) Specify if request cache should be used for this request or not, defaults to index level setting.restTotalHitsAsInt(Boolean value) Indicates whetherhits.totalshould be rendered as an integer or an object in the rest search response.A comma-separated list of specific routing values.A comma-separated list of specific routing values.Specify how long a consistent view of the index should be maintained for scrolled search.Specify how long a consistent view of the index should be maintained for scrolled search.searchType(SearchType value) Search operation type.protected SearchModelsRequest.Builderself()seqNoPrimaryTerm(Boolean value) Specify whether to return sequence number and primary term of the last modification of each hit.Number of hits to return.A comma-separated list of <field>:<direction> pairs.A comma-separated list of <field>:<direction> pairs.Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.sourceExcludes(String value, String... values) List of fields to exclude from the returned_sourcefield.sourceExcludes(List<String> list) List of fields to exclude from the returned_sourcefield.sourceIncludes(String value, String... values) List of fields to extract and return from the_sourcefield.sourceIncludes(List<String> list) List of fields to extract and return from the_sourcefield.Specific 'tag' of the request for logging and statistical purposes.Specific 'tag' of the request for logging and statistical purposes.storedFields(String value, String... values) A comma-separated list of stored fields to return.storedFields(List<String> list) A comma-separated list of stored fields to return.suggestField(String value) Specify which field to use for suggestions.suggestMode(SuggestMode value) Specify suggest mode.suggestSize(Integer value) How many suggestions to return in response.suggestText(String value) The source text for which the suggestions should be returned.terminateAfter(Integer value) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.Operation timeout.Operation timeout.trackScores(Boolean value) Whether to calculate and return scores even if they are not used for sorting.trackTotalHits(Boolean value) Indicate if the number of documents that match the query should be tracked.Whether to return document version as part of a hit.Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, humanMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<SearchModelsRequest.Builder,SearchModelsRequest> - Returns:
- a new builder instance.
-
self
- Specified by:
selfin classRequestBase.AbstractBuilder<SearchModelsRequest.Builder>
-
allowNoIndices
Whether to ignore if a wildcard indexes expression resolves into no concrete indexes. (This includes_allstring or when no indexes have been specified).API name:
allow_no_indices -
allowPartialSearchResults
@Nonnull public final SearchModelsRequest.Builder allowPartialSearchResults(@Nullable Boolean value) Indicate if an error should be returned if there is a partial search failure or timeout.API name:
allow_partial_search_results -
analyzeWildcard
Specify whether wildcard and prefix queries should be analyzed.API name:
analyze_wildcard -
analyzer
The analyzer to use for the query string.API name:
analyzer -
batchedReduceSize
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.API name:
batched_reduce_size -
ccsMinimizeRoundtrips
Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution.API name:
ccs_minimize_roundtrips -
defaultOperator
The default operator for query string query (AND or OR).API name:
default_operator -
df
The field to use as default where no field prefix is given in the query string.API name:
df -
docvalueFields
A comma-separated list of fields to return as the docvalue representation of a field for each hit.API name:
docvalue_fieldsAdds all elements of
listtodocvalueFields. -
docvalueFields
A comma-separated list of fields to return as the docvalue representation of a field for each hit.API name:
docvalue_fieldsAdds one or more values to
docvalueFields. -
expandWildcards
Whether to expand wildcard expression to concrete indexes that are open, closed or both.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
@Nonnull public final SearchModelsRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) Whether to expand wildcard expression to concrete indexes that are open, closed or both.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
explain
Specify whether to return detailed information about score computation as part of a hit.API name:
explain -
from
Starting offset.API name:
from -
ignoreThrottled
Whether specified concrete, expanded or aliased indexes should be ignored when throttled.API name:
ignore_throttled -
lenient
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored.API name:
lenient -
maxConcurrentShardRequests
@Nonnull public final SearchModelsRequest.Builder maxConcurrentShardRequests(@Nullable Integer value) The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests.API name:
max_concurrent_shard_requests -
preFilterShardSize
Threshold that enforces a pre-filter round-trip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter round-trip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method, that is if date filters are mandatory to match but the shard bounds and the query are disjoint.API name:
pre_filter_shard_size -
preference
Specify the node or shard the operation should be performed on.API name:
preference -
q
Query in the Lucene query string syntax.API name:
q -
requestCache
Specify if request cache should be used for this request or not, defaults to index level setting.API name:
request_cache -
restTotalHitsAsInt
Indicates whetherhits.totalshould be rendered as an integer or an object in the rest search response.API name:
rest_total_hits_as_int -
routing
A comma-separated list of specific routing values.API name:
routingAdds all elements of
listtorouting. -
routing
A comma-separated list of specific routing values.API name:
routingAdds one or more values to
routing. -
scroll
Specify how long a consistent view of the index should be maintained for scrolled search.API name:
scroll -
scroll
@Nonnull public final SearchModelsRequest.Builder scroll(Function<Time.Builder, ObjectBuilder<Time>> fn) Specify how long a consistent view of the index should be maintained for scrolled search.API name:
scroll -
searchType
Search operation type.API name:
search_type -
seqNoPrimaryTerm
Specify whether to return sequence number and primary term of the last modification of each hit.API name:
seq_no_primary_term -
size
Number of hits to return.API name:
size -
sort
A comma-separated list of <field>:<direction> pairs.API name:
sortAdds all elements of
listtosort. -
sort
A comma-separated list of <field>:<direction> pairs.API name:
sortAdds one or more values to
sort. -
source
Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.API name:
_sourceAdds all elements of
listtosource. -
source
Set totrueorfalseto return the_sourcefield or not, or a list of fields to return.API name:
_sourceAdds one or more values to
source. -
sourceExcludes
List of fields to exclude from the returned_sourcefield.API name:
_source_excludesAdds all elements of
listtosourceExcludes. -
sourceExcludes
List of fields to exclude from the returned_sourcefield.API name:
_source_excludesAdds one or more values to
sourceExcludes. -
sourceIncludes
List of fields to extract and return from the_sourcefield.API name:
_source_includesAdds all elements of
listtosourceIncludes. -
sourceIncludes
List of fields to extract and return from the_sourcefield.API name:
_source_includesAdds one or more values to
sourceIncludes. -
stats
Specific 'tag' of the request for logging and statistical purposes.API name:
statsAdds all elements of
listtostats. -
stats
Specific 'tag' of the request for logging and statistical purposes.API name:
statsAdds one or more values to
stats. -
storedFields
A comma-separated list of stored fields to return.API name:
stored_fieldsAdds all elements of
listtostoredFields. -
storedFields
A comma-separated list of stored fields to return.API name:
stored_fieldsAdds one or more values to
storedFields. -
suggestField
Specify which field to use for suggestions.API name:
suggest_field -
suggestMode
Specify suggest mode.API name:
suggest_mode -
suggestSize
How many suggestions to return in response.API name:
suggest_size -
suggestText
The source text for which the suggestions should be returned.API name:
suggest_text -
terminateAfter
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.API name:
terminate_after -
timeout
Operation timeout.API name:
timeout -
timeout
@Nonnull public final SearchModelsRequest.Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Operation timeout.API name:
timeout -
trackScores
Whether to calculate and return scores even if they are not used for sorting.API name:
track_scores -
trackTotalHits
Indicate if the number of documents that match the query should be tracked.API name:
track_total_hits -
version
Whether to return document version as part of a hit.API name:
version -
build
Builds aSearchModelsRequest.- Specified by:
buildin interfaceObjectBuilder<SearchModelsRequest>- Throws:
NullPointerException- if some of the required fields are null.
-