Class GetSourceRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.GetSourceRequest
Get a document's source.
Get the source of a document. For example:
GET my-index-000001/_source/1
You can use the source filtering parameters to control which parts of the
_source are returned:
GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleEndpoint<GetSourceRequest,?> Endpoint "get_source". -
Method Summary
Modifier and TypeMethodDescriptionstatic <TDocument>
Endpoint<GetSourceRequest,GetSourceResponse<TDocument>, ErrorResponse> createGetSourceEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "get_source" endpoint.final Stringid()Required - A unique document identifier.final Stringindex()Required - The name of the index that contains the document.static GetSourceRequestfinal StringThe node or shard the operation should be performed on.final Booleanrealtime()Iftrue, the request is real-time as opposed to near-real-time.final Booleanrefresh()Iftrue, the request refreshes the relevant shards before retrieving the document.final Stringrouting()A custom value used to route operations to a specific shard.final SourceConfigParamsource()Indicates whether to return the_sourcefield (trueorfalse) or lists the fields to return.A comma-separated list of source fields to exclude in the response.A comma-separated list of source fields to include in the response.final Longversion()The version number for concurrency control.final VersionTypeThe version type.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_ENDPOINT
Endpoint "get_source".
-
-
Method Details
-
of
public static GetSourceRequest of(Function<GetSourceRequest.Builder, ObjectBuilder<GetSourceRequest>> fn) -
source
Indicates whether to return the_sourcefield (trueorfalse) or lists the fields to return.API name:
_source -
sourceExcludes
A comma-separated list of source fields to exclude in the response.API name:
_source_excludes -
sourceIncludes
A comma-separated list of source fields to include in the response.API name:
_source_includes -
id
Required - A unique document identifier.API name:
id -
index
Required - The name of the index that contains the document.API name:
index -
preference
The node or shard the operation should be performed on. By default, the operation is randomized between the shard replicas.API name:
preference -
realtime
Iftrue, the request is real-time as opposed to near-real-time.API name:
realtime -
refresh
Iftrue, the request refreshes the relevant shards before retrieving the document. Setting it totrueshould be done after careful thought and verification that this does not cause a heavy load on the system (and slow down indexing).API name:
refresh -
routing
A custom value used to route operations to a specific shard.API name:
routing -
version
The version number for concurrency control. It must match the current version of the document for the request to succeed.API name:
version -
versionType
The version type.API name:
version_type -
createGetSourceEndpoint
public static <TDocument> Endpoint<GetSourceRequest,GetSourceResponse<TDocument>, createGetSourceEndpointErrorResponse> (JsonpDeserializer<TDocument> tDocumentDeserializer) Create an "get_source" endpoint.
-