Class SearchShardsRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder<SearchShardsRequest.Builder>
-
- org.opensearch.client.opensearch.core.SearchShardsRequest.Builder
-
- All Implemented Interfaces:
CopyableBuilder<SearchShardsRequest.Builder,SearchShardsRequest>,MutableBuilder<SearchShardsRequest.Builder,SearchShardsRequest>,ObjectBuilder<SearchShardsRequest>
- Enclosing class:
- SearchShardsRequest
public static class SearchShardsRequest.Builder extends RequestBase.AbstractBuilder<SearchShardsRequest.Builder> implements CopyableBuilder<SearchShardsRequest.Builder,SearchShardsRequest>
Builder forSearchShardsRequest.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchShardsRequest.BuilderallowNoIndices(java.lang.Boolean value)Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes.SearchShardsRequestbuild()Builds aSearchShardsRequest.SearchShardsRequest.Buildercopy()Create a new builderCopyableBuilderthat is a copy of this one.SearchShardsRequest.BuilderexpandWildcards(java.util.List<ExpandWildcard> list)Type of index that wildcard patterns can match.SearchShardsRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values)Type of index that wildcard patterns can match.SearchShardsRequest.BuilderignoreUnavailable(java.lang.Boolean value)Iffalse, the request returns an error if it targets a missing or closed index.SearchShardsRequest.Builderindex(java.lang.String value, java.lang.String... values)Returns the indexes and shards that a search request would be executed against.SearchShardsRequest.Builderindex(java.util.List<java.lang.String> list)Returns the indexes and shards that a search request would be executed against.SearchShardsRequest.Builderlocal(java.lang.Boolean value)Iftrue, the request retrieves information from the local node only.SearchShardsRequest.Builderpreference(java.lang.String value)Specifies the node or shard the operation should be performed on.SearchShardsRequest.Builderrouting(java.lang.String value)A custom value used to route operations to a specific shard.protected SearchShardsRequest.Builderself()SearchShardsRequest.Builderslice(java.util.function.Function<SlicedScroll.Builder,ObjectBuilder<SlicedScroll>> fn)API name:sliceSearchShardsRequest.Builderslice(SlicedScroll value)API name:slice-
Methods inherited from class org.opensearch.client.opensearch._types.RequestBase.AbstractBuilder
errorTrace, human
-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAll
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
-
-
-
Method Detail
-
copy
@Nonnull public SearchShardsRequest.Builder copy()
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<SearchShardsRequest.Builder,SearchShardsRequest>- Returns:
- a new builder instance.
-
self
@Nonnull protected SearchShardsRequest.Builder self()
- Specified by:
selfin classRequestBase.AbstractBuilder<SearchShardsRequest.Builder>
-
allowNoIndices
@Nonnull public final SearchShardsRequest.Builder allowNoIndices(@Nullable java.lang.Boolean value)
Iffalse, the request returns an error if any wildcard expression, index alias, or_allvalue targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targetingfoo*,bar*returns an error if an index starts withfoobut no index starts withbar.API name:
allow_no_indices
-
expandWildcards
@Nonnull public final SearchShardsRequest.Builder expandWildcards(java.util.List<ExpandWildcard> list)
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden. Valid values are:all,open,closed,hidden,none.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards.
-
expandWildcards
@Nonnull public final SearchShardsRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden. Valid values are:all,open,closed,hidden,none.API name:
expand_wildcardsAdds one or more values to
expandWildcards.
-
ignoreUnavailable
@Nonnull public final SearchShardsRequest.Builder ignoreUnavailable(@Nullable java.lang.Boolean value)
Iffalse, the request returns an error if it targets a missing or closed index.API name:
ignore_unavailable
-
index
@Nonnull public final SearchShardsRequest.Builder index(java.util.List<java.lang.String> list)
Returns the indexes and shards that a search request would be executed against.API name:
indexAdds all elements of
listtoindex.
-
index
@Nonnull public final SearchShardsRequest.Builder index(java.lang.String value, java.lang.String... values)
Returns the indexes and shards that a search request would be executed against.API name:
indexAdds one or more values to
index.
-
local
@Nonnull public final SearchShardsRequest.Builder local(@Nullable java.lang.Boolean value)
Iftrue, the request retrieves information from the local node only.API name:
local
-
preference
@Nonnull public final SearchShardsRequest.Builder preference(@Nullable java.lang.String value)
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference
-
routing
@Nonnull public final SearchShardsRequest.Builder routing(@Nullable java.lang.String value)
A custom value used to route operations to a specific shard.API name:
routing
-
slice
@Nonnull public final SearchShardsRequest.Builder slice(@Nullable SlicedScroll value)
API name:slice
-
slice
@Nonnull public final SearchShardsRequest.Builder slice(java.util.function.Function<SlicedScroll.Builder,ObjectBuilder<SlicedScroll>> fn)
API name:slice
-
build
@Nonnull public SearchShardsRequest build()
Builds aSearchShardsRequest.- Specified by:
buildin interfaceObjectBuilder<SearchShardsRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-