Class CreatePitRequest.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.core.pit.CreatePitRequest.Builder
-
- All Implemented Interfaces:
ObjectBuilder<CreatePitRequest>
- Enclosing class:
- CreatePitRequest
public static class CreatePitRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<CreatePitRequest>
Builder forCreatePitRequest
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatePitRequest.BuilderallowPartialPitCreation(java.lang.Boolean allowPartialPitCreation)Specifies whether to create a PIT with partial failures.CreatePitRequestbuild()Builds aCreatePitRequest.CreatePitRequest.BuilderexpandWildcards(java.util.List<ExpandWildcard> list)The type of index that can match the wildcard pattern.CreatePitRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values)The type of index that can match the wildcard pattern.CreatePitRequest.BuilderkeepAlive(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Required - The amount of time to keep the PIT.CreatePitRequest.BuilderkeepAlive(Time keepAlive)Required - The amount of time to keep the PIT.CreatePitRequest.Builderpreference(java.lang.String preference)The node or the shard used to perform the search.CreatePitRequest.Builderrouting(java.lang.String routing)Specifies to route search requests to a specific shard.CreatePitRequest.BuildertargetIndexes(java.lang.String value, java.lang.String... values)Required - The name(s) of the target index(es) for the PIT.CreatePitRequest.BuildertargetIndexes(java.util.List<java.lang.String> list)Required - The name(s) of the target index(es) for the PIT.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
targetIndexes
public final CreatePitRequest.Builder targetIndexes(java.util.List<java.lang.String> list)
Required - The name(s) of the target index(es) for the PIT. May contain a comma-separated list or a wildcard index pattern.API name:
target_indexesAdds all elements of
listtotargetIndexes.
-
targetIndexes
public final CreatePitRequest.Builder targetIndexes(java.lang.String value, java.lang.String... values)
Required - The name(s) of the target index(es) for the PIT. May contain a comma-separated list or a wildcard index pattern.API name:
target_indexesAdds one or more values to
targetIndexes.
-
keepAlive
public final CreatePitRequest.Builder keepAlive(Time keepAlive)
Required - The amount of time to keep the PIT. Every time you access a PIT by using the Search API, the PIT lifetime is extended by the amount of time equal to the keep_alive parameter.API name:
keep_alive
-
keepAlive
public final CreatePitRequest.Builder keepAlive(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Required - The amount of time to keep the PIT. Every time you access a PIT by using the Search API, the PIT lifetime is extended by the amount of time equal to the keep_alive parameter.API name:
keep_alive
-
preference
public final CreatePitRequest.Builder preference(@Nullable java.lang.String preference)
The node or the shard used to perform the search. Optional. Default is random.API name:
preference
-
routing
public final CreatePitRequest.Builder routing(@Nullable java.lang.String routing)
Specifies to route search requests to a specific shard. Optional. Default is the document’s _id.API name:
routing
-
expandWildcards
public final CreatePitRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcard> list)
The type of index that can match the wildcard pattern. Supports comma-separated values. Valid values are the following: - all: Match any index or data stream, including hidden ones. - open: Match open, non-hidden indexes or non-hidden data streams. - closed: Match closed, non-hidden indexes or non-hidden data streams. - hidden: Match hidden indexes or data streams. Must be combined with open, closed or both open and closed. - none: No wildcard patterns are accepted. Optional. Default is open.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards.
-
expandWildcards
public final CreatePitRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
The type of index that can match the wildcard pattern. Supports comma-separated values. Valid values are the following: - all: Match any index or data stream, including hidden ones. - open: Match open, non-hidden indexes or non-hidden data streams. - closed: Match closed, non-hidden indexes or non-hidden data streams. - hidden: Match hidden indexes or data streams. Must be combined with open, closed or both open and closed. - none: No wildcard patterns are accepted. Optional. Default is open.API name:
expand_wildcardsAdds one or more values to
expandWildcards.
-
allowPartialPitCreation
public final CreatePitRequest.Builder allowPartialPitCreation(@Nullable java.lang.Boolean allowPartialPitCreation)
Specifies whether to create a PIT with partial failures. Optional. Default is true.API name:
allow_partial_pit_creation
-
build
public CreatePitRequest build()
Builds aCreatePitRequest.- Specified by:
buildin interfaceObjectBuilder<CreatePitRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-