java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.action.get.MultiGetRequest
- All Implemented Interfaces:
Iterable<MultiGetRequest.Item>,CompositeIndicesRequest,RealtimeRequest,Writeable,RefCounted,TaskAwareRequest,TransportRequest,ToXContent,ToXContentObject
public class MultiGetRequest
extends LegacyActionRequest
implements Iterable<MultiGetRequest.Item>, CompositeIndicesRequest, RealtimeRequest, ToXContentObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCEDFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(String defaultIndex, String[] defaultFields, FetchSourceContext defaultFetchSource, String defaultRouting, XContentParser parser, boolean allowExplicitIndex) add(MultiGetRequest.Item item) getItems()booleanShould this request forcesynthetic source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.iterator()static voidparseIds(XContentParser parser, List<MultiGetRequest.Item> items, String defaultIndex, String[] defaultFields, FetchSourceContext defaultFetchSource, String defaultRouting) preference(String preference) Sets the preference to execute the search.booleanrealtime()realtime(boolean realtime) booleanrefresh()refresh(boolean refresh) setForceSyntheticSource(boolean forceSyntheticSource) Should this request forcesynthetic source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.toXContent(XContentBuilder builder, ToXContent.Params params) validate()voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, createTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
MultiGetRequest
public MultiGetRequest() -
MultiGetRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-
getItems
-
add
-
add
-
validate
- Specified by:
validatein classActionRequest
-
preference
Sets the preference to execute the search. Defaults to randomize across shards. Can be set to_localto prefer local shards or a custom value, which guarantees that the same order will be used across different requests. -
preference
-
realtime
public boolean realtime() -
realtime
- Specified by:
realtimein interfaceRealtimeRequest- Parameters:
realtime- Controls whether this request should be realtime by reading from the translog.
-
refresh
public boolean refresh() -
refresh
-
setForceSyntheticSource
Should this request forcesynthetic source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. -
isForceSyntheticSource
public boolean isForceSyntheticSource()Should this request forcesynthetic source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. -
add
public MultiGetRequest add(@Nullable String defaultIndex, @Nullable String[] defaultFields, @Nullable FetchSourceContext defaultFetchSource, @Nullable String defaultRouting, XContentParser parser, boolean allowExplicitIndex) throws IOException - Throws:
IOException
-
parseIds
public static void parseIds(XContentParser parser, List<MultiGetRequest.Item> items, @Nullable String defaultIndex, @Nullable String[] defaultFields, @Nullable FetchSourceContext defaultFetchSource, @Nullable String defaultRouting) throws IOException - Throws:
IOException
-
iterator
- Specified by:
iteratorin interfaceIterable<MultiGetRequest.Item>
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-