Package org.elasticsearch.action.get
Class MultiGetRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.get.MultiGetRequest
- All Implemented Interfaces:
Iterable<MultiGetRequest.Item>,CompositeIndicesRequest,RealtimeRequest,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject,org.elasticsearch.core.RefCounted,TaskAwareRequest
public class MultiGetRequest
extends ActionRequest
implements Iterable<MultiGetRequest.Item>, CompositeIndicesRequest, RealtimeRequest, org.elasticsearch.common.xcontent.ToXContentObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.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.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.add(String defaultIndex, String defaultType, String[] defaultFields, FetchSourceContext defaultFetchSource, String defaultRouting, org.elasticsearch.common.xcontent.XContentParser parser, boolean allowExplicitIndex)add(MultiGetRequest.Item item)getItems()iterator()static voidparseIds(org.elasticsearch.common.xcontent.XContentParser parser, List<MultiGetRequest.Item> items, String defaultIndex, String defaultType, String[] defaultFields, FetchSourceContext defaultFetchSource, String defaultRouting)preference(String preference)Sets the preference to execute the search.booleanrealtime()realtime(boolean realtime)booleanrefresh()refresh(boolean refresh)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.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.TransportRequest
getParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, 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.tasks.TaskAwareRequest
createTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
MultiGetRequest
public MultiGetRequest() -
MultiGetRequest
- Throws:
IOException
-
-
Method Details
-
getItems
-
add
-
add
Deprecated.Types are in the process of being removed, useadd(String, String)instead. -
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
-
add
public MultiGetRequest add(@Nullable String defaultIndex, @Nullable String defaultType, @Nullable String[] defaultFields, @Nullable FetchSourceContext defaultFetchSource, @Nullable String defaultRouting, org.elasticsearch.common.xcontent.XContentParser parser, boolean allowExplicitIndex) throws IOException- Throws:
IOException
-
parseIds
public static void parseIds(org.elasticsearch.common.xcontent.XContentParser parser, List<MultiGetRequest.Item> items, @Nullable String defaultIndex, @Nullable String defaultType, @Nullable String[] defaultFields, @Nullable FetchSourceContext defaultFetchSource, @Nullable String defaultRouting) throws IOException- Throws:
IOException
-
iterator
- Specified by:
iteratorin interfaceIterable<MultiGetRequest.Item>
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
add(String, String)instead.