Class GetSourceRequest.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.GetSourceRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<GetSourceRequest>
- Enclosing class:
GetSourceRequest
public static class GetSourceRequest.Builder
extends ObjectBuilderBase
implements ObjectBuilder<GetSourceRequest>
Builder for
GetSourceRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGetSourceRequest.final GetSourceRequest.BuilderRequired - Unique identifier of the document.final GetSourceRequest.BuilderRequired - Name of the index that contains the document.final GetSourceRequest.Builderpreference(String value) Specifies the node or shard the operation should be performed on.final GetSourceRequest.BuilderBoolean) If true, the request is real-time as opposed to near-real-time.final GetSourceRequest.BuilderIf true, OpenSearch refreshes the affected shards to make this operation visible to search.final GetSourceRequest.BuilderTarget the specified primary shard.final GetSourceRequest.BuilderTrue or false to return the _source field or not, or a list of fields to return.final GetSourceRequest.Buildersource(SourceConfigParam value) True or false to return the _source field or not, or a list of fields to return.final GetSourceRequest.BuildersourceExcludes(String value, String... values) A comma-separated list of source fields to exclude in the response.final GetSourceRequest.BuildersourceExcludes(List<String> list) A comma-separated list of source fields to exclude in the response.final GetSourceRequest.BuildersourceIncludes(String value, String... values) A comma-separated list of source fields to include in the response.final GetSourceRequest.BuildersourceIncludes(List<String> list) A comma-separated list of source fields to include in the response.final GetSourceRequest.BuilderstoredFields(String value, String... values) API name:stored_fieldsfinal GetSourceRequest.BuilderstoredFields(List<String> list) API name:stored_fieldsfinal GetSourceRequest.BuilderExplicit version number for concurrency control.final GetSourceRequest.BuilderversionType(VersionType value) Specific version type: internal, external, external_gte.Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
True or false to return the _source field or not, or a list of fields to return.API name:
_source -
source
public final GetSourceRequest.Builder source(Function<SourceConfigParam.Builder, ObjectBuilder<SourceConfigParam>> fn) True or false to return the _source field or not, or a list of fields to return.API name:
_source -
sourceExcludes
A comma-separated list of source fields to exclude in the response.API name:
_source_excludesAdds all elements of
listtosourceExcludes. -
sourceExcludes
A comma-separated list of source fields to exclude in the response.API name:
_source_excludesAdds one or more values to
sourceExcludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds all elements of
listtosourceIncludes. -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includesAdds one or more values to
sourceIncludes. -
id
Required - Unique identifier of the document.API name:
id -
index
Required - Name of the index that contains the document.API name:
index -
preference
Specifies the node or shard the operation should be performed on. Random by default.API name:
preference -
realtime
Boolean) If true, the request is real-time as opposed to near-real-time.API name:
realtime -
refresh
If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.API name:
refresh -
routing
Target the specified primary shard.API name:
routing -
storedFields
API name:stored_fieldsAdds all elements of
listtostoredFields. -
storedFields
API name:stored_fieldsAdds one or more values to
storedFields. -
version
Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.API name:
version -
versionType
Specific version type: internal, external, external_gte.API name:
version_type -
build
Builds aGetSourceRequest.- Specified by:
buildin interfaceObjectBuilder<GetSourceRequest>- Throws:
NullPointerException- if some of the required fields are null.
-