Package org.elasticsearch.client.core
Class GetSourceRequest
java.lang.Object
org.elasticsearch.client.core.GetSourceRequest
- All Implemented Interfaces:
Validatable
-
Field Summary
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.search.fetch.subphase.FetchSourceContext
fetchSourceContext
(org.elasticsearch.search.fetch.subphase.FetchSourceContext context) Allows setting theFetchSourceContext
for this request, controlling if and how _source should be returned.static GetSourceRequest
from
(org.elasticsearch.action.get.GetRequest getRequest) id()
index()
preference
(String preference) Sets the preference to execute the search.boolean
realtime()
realtime
(boolean realtime) boolean
refresh()
refresh
(boolean refresh) Should a refresh be executed before this get operation causing the operation to return the latest value.routing()
Controls the shard routing of the request.type()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
Constructor Details
-
GetSourceRequest
-
-
Method Details
-
from
-
routing
Controls the shard routing of the request. Using this value to hash the shard and not the id. -
preference
Sets the preference to execute the search. Defaults to randomize across shards. Can be set to_local
to prefer local shards or a custom value, which guarantees that the same order will be used across different requests. -
refresh
Should a refresh be executed before this get operation causing the operation to return the latest value. Note, heavy get should not set this totrue
. Defaults tofalse
. -
realtime
-
fetchSourceContext
public GetSourceRequest fetchSourceContext(org.elasticsearch.search.fetch.subphase.FetchSourceContext context) Allows setting theFetchSourceContext
for this request, controlling if and how _source should be returned. Note, thefetchSource
field of the context must be set totrue
. -
index
-
type
-
type
-
id
-
routing
-
preference
-
refresh
public boolean refresh() -
realtime
public boolean realtime() -
fetchSourceContext
public org.elasticsearch.search.fetch.subphase.FetchSourceContext fetchSourceContext()
-