public class GetRequestBuilder extends SingleShardOperationRequestBuilder<GetRequest,GetResponse,GetRequestBuilder>
action, client, request
Constructor and Description |
---|
GetRequestBuilder(ElasticsearchClient client,
GetAction action) |
GetRequestBuilder(ElasticsearchClient client,
GetAction action,
String index) |
Modifier and Type | Method and Description |
---|---|
GetRequestBuilder |
setFetchSource(boolean fetch)
Indicates whether the response should contain the stored _source.
|
GetRequestBuilder |
setFetchSource(String[] includes,
String[] excludes)
Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard
elements.
|
GetRequestBuilder |
setFetchSource(String include,
String exclude)
Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard
elements.
|
GetRequestBuilder |
setFields(String... fields)
Explicitly specify the fields that will be returned.
|
GetRequestBuilder |
setId(String id)
Sets the id of the document to fetch.
|
GetRequestBuilder |
setIgnoreErrorsOnGeneratedFields(Boolean ignoreErrorsOnGeneratedFields) |
GetRequestBuilder |
setParent(String parent)
Sets the parent id of this document.
|
GetRequestBuilder |
setPreference(String preference)
Sets the preference to execute the search.
|
GetRequestBuilder |
setRealtime(Boolean realtime) |
GetRequestBuilder |
setRefresh(boolean refresh)
Should a refresh be executed before this get operation causing the operation to
return the latest value.
|
GetRequestBuilder |
setRouting(String routing)
Controls the shard routing of the request.
|
GetRequestBuilder |
setTransformSource(boolean transform)
Should the source be transformed using the script to used at index time
(if any)? Note that calling this without having called setFetchSource
will automatically turn on source fetching.
|
GetRequestBuilder |
setType(String type)
Sets the type of the document to fetch.
|
GetRequestBuilder |
setVersion(long version)
Sets the version, which will cause the get operation to only be performed if a matching
version exists and no changes happened on the doc since then.
|
GetRequestBuilder |
setVersionType(VersionType versionType)
Sets the versioning type.
|
setIndex, setOperationThreaded
beforeExecute, execute, execute, get, get, get, putHeader, request
public GetRequestBuilder(ElasticsearchClient client, GetAction action)
public GetRequestBuilder(ElasticsearchClient client, GetAction action, @Nullable String index)
public GetRequestBuilder setType(@Nullable String type)
public GetRequestBuilder setId(String id)
public GetRequestBuilder setParent(String parent)
public GetRequestBuilder setRouting(String routing)
public GetRequestBuilder setPreference(String preference)
public GetRequestBuilder setFields(String... fields)
public GetRequestBuilder setFetchSource(boolean fetch)
public GetRequestBuilder setTransformSource(boolean transform)
public GetRequestBuilder setFetchSource(@Nullable String include, @Nullable String exclude)
include
- An optional include (optionally wildcarded) pattern to filter the returned _sourceexclude
- An optional exclude (optionally wildcarded) pattern to filter the returned _sourcepublic GetRequestBuilder setFetchSource(@Nullable String[] includes, @Nullable String[] excludes)
includes
- An optional list of include (optionally wildcarded) pattern to filter the returned _sourceexcludes
- An optional list of exclude (optionally wildcarded) pattern to filter the returned _sourcepublic GetRequestBuilder setRefresh(boolean refresh)
public GetRequestBuilder setRealtime(Boolean realtime)
public GetRequestBuilder setIgnoreErrorsOnGeneratedFields(Boolean ignoreErrorsOnGeneratedFields)
public GetRequestBuilder setVersion(long version)
public GetRequestBuilder setVersionType(VersionType versionType)
VersionType.INTERNAL
.Copyright © 2009–2016. All rights reserved.