Class GetRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch._core.GetRequest
- All Implemented Interfaces:
ElasticsearchCommonRequest
- 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 Constructor Description GetRequest(GetRequest.AbstractBuilder<?> builder) -
Method Summary
Modifier and Type Method Description static <TDocument>
Endpoint<GetRequest,GetResponse<TDocument>,ElasticsearchError>createGetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "get" endpoint.java.lang.Stringid()Required - Unique identifier of the document.java.lang.Stringindex()Required - 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.java.lang.Stringrouting()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.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()A comma-separated list of stored fields to return in the responsejava.lang.Stringtype()The type of the document (use_allto fetch the first document matching the ID across all types)java.lang.Longversion()Explicit version number for concurrency control.VersionTypeversionType()Specific version type: internal, external, external_gte.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GetRequest
-
-
Method Details
-
id
public java.lang.String id()Required - Unique identifier of the document.API name:
id -
index
public java.lang.String index()Required - Name of the index that contains the document.API name:
index -
type
@Nullable public java.lang.String type()The type of the document (use_allto fetch the first document matching the ID across all types)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 java.lang.String routing()Target the specified primary shard.API name:
routing -
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 -
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()A comma-separated list of stored fields to return in the responseAPI name:
stored_fields -
version
@Nullable public java.lang.Long 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 -
createGetEndpoint
public static <TDocument> Endpoint<GetRequest,GetResponse<TDocument>,ElasticsearchError> createGetEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)Create an "get" endpoint.
-