Class GetRequest
java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch._global.GetRequest
- Direct Known Subclasses:
GetSourceRequest
public class GetRequest extends RequestBase
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGetRequest.AbstractBuilder<BuilderT extends GetRequest.AbstractBuilder<BuilderT>>static classGetRequest.BuilderBuilder forGetRequest. -
Constructor Summary
Constructors Modifier Constructor Description protectedGetRequest(GetRequest.AbstractBuilder<?> builder) -
Method Summary
Modifier and Type Method Description static <TDocument>
Endpoint<GetRequest,GetResponse<TDocument>,OpenSearchError>createGetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "get" endpoint.java.lang.Stringid()Unique identifier of the document.java.lang.Stringindex()Name of the index that contains the document.java.lang.Stringpreference()Specifies the node or shard the operation should be performed on.java.lang.Booleanrealtime()Boolean) If true, the request is real-time as opposed to near-real-time.java.lang.Booleanrefresh()If true, Elasticsearch refreshes the affected shards to make this operation visible to search.jakarta.json.JsonValuerouting()Target the specified primary shard.jakarta.json.JsonValuesource()True or false to return the _source field or not, or a list of fields to return.java.lang.BooleansourceEnabled()API name:source_enabledjava.util.List<java.lang.String>sourceExcludes()A comma-separated list of source fields to exclude in the response.java.util.List<java.lang.String>sourceIncludes()A comma-separated list of source fields to include in the response.java.util.List<java.lang.String>storedFields()API name:stored_fieldsjava.lang.Stringtype()API name:typejava.lang.Numberversion()Explicit version number for concurrency control.jakarta.json.JsonValueversionType()Specific version type: internal, external, external_gte.
-
Constructor Details
-
Method Details
-
id
public java.lang.String id()Unique identifier of the document. API name:id -
index
public java.lang.String index()Name of the index that contains the document. API name:index -
type
@Nullable public java.lang.String type()API name:type -
preference
@Nullable public java.lang.String preference()Specifies the node or shard the operation should be performed on. Random by default. API name:preference -
realtime
@Nullable public java.lang.Boolean realtime()Boolean) If true, the request is real-time as opposed to near-real-time. API name:realtime -
refresh
@Nullable public java.lang.Boolean refresh()If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. API name:refresh -
routing
@Nullable public jakarta.json.JsonValue routing()Target the specified primary shard. API name:routing -
sourceEnabled
@Nullable public java.lang.Boolean sourceEnabled()API name:source_enabled -
sourceExcludes
@Nullable public java.util.List<java.lang.String> sourceExcludes()A comma-separated list of source fields to exclude in the response. API name:_source_excludes -
sourceIncludes
@Nullable public java.util.List<java.lang.String> sourceIncludes()A comma-separated list of source fields to include in the response. API name:_source_includes -
storedFields
@Nullable public java.util.List<java.lang.String> storedFields()API name:stored_fields -
version
@Nullable public java.lang.Number 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
@Nullable public jakarta.json.JsonValue versionType()Specific version type: internal, external, external_gte. API name:version_type -
source
@Nullable public jakarta.json.JsonValue source()True or false to return the _source field or not, or a list of fields to return. API name:_source -
createGetEndpoint
public static <TDocument> Endpoint<GetRequest,GetResponse<TDocument>,OpenSearchError> createGetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "get" endpoint.
-