Package org.elasticsearch.action.get
Class MultiGetRequest.Item
- java.lang.Object
-
- org.elasticsearch.action.get.MultiGetRequest.Item
-
- All Implemented Interfaces:
IndicesRequest
,Streamable
,ToXContent
,ToXContentObject
- Enclosing class:
- MultiGetRequest
public static class MultiGetRequest.Item extends java.lang.Object implements Streamable, IndicesRequest, ToXContentObject
A single get item.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
FetchSourceContext
fetchSourceContext()
MultiGetRequest.Item
fetchSourceContext(FetchSourceContext fetchSourceContext)
Allows setting theFetchSourceContext
for this request, controlling if and how _source should be returned.int
hashCode()
java.lang.String
id()
java.lang.String
index()
MultiGetRequest.Item
index(java.lang.String index)
java.lang.String[]
indices()
Returns the array of indices that the action relates toIndicesOptions
indicesOptions()
Returns the indices options used to resolve indices.void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.static MultiGetRequest.Item
readItem(StreamInput in)
java.lang.String
routing()
MultiGetRequest.Item
routing(java.lang.String routing)
The routing associated with this document.java.lang.String[]
storedFields()
MultiGetRequest.Item
storedFields(java.lang.String... fields)
java.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.String
type()
long
version()
MultiGetRequest.Item
version(long version)
VersionType
versionType()
MultiGetRequest.Item
versionType(VersionType versionType)
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
Item
public Item()
-
Item
@Deprecated public Item(java.lang.String index, @Nullable java.lang.String type, java.lang.String id)
Deprecated.Types are in the process of being removed, useinstead
.Constructs a single get item.- Parameters:
index
- The index nametype
- The type (can be null)id
- The id
-
Item
public Item(java.lang.String index, java.lang.String id)
-
-
Method Detail
-
index
public java.lang.String index()
-
indices
public java.lang.String[] indices()
Description copied from interface:IndicesRequest
Returns the array of indices that the action relates to- Specified by:
indices
in interfaceIndicesRequest
-
indicesOptions
public IndicesOptions indicesOptions()
Description copied from interface:IndicesRequest
Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.- Specified by:
indicesOptions
in interfaceIndicesRequest
-
index
public MultiGetRequest.Item index(java.lang.String index)
-
type
public java.lang.String type()
-
id
public java.lang.String id()
-
routing
public MultiGetRequest.Item routing(java.lang.String routing)
The routing associated with this document.
-
routing
public java.lang.String routing()
-
storedFields
public MultiGetRequest.Item storedFields(java.lang.String... fields)
-
storedFields
public java.lang.String[] storedFields()
-
version
public long version()
-
version
public MultiGetRequest.Item version(long version)
-
versionType
public VersionType versionType()
-
versionType
public MultiGetRequest.Item versionType(VersionType versionType)
-
fetchSourceContext
public FetchSourceContext fetchSourceContext()
-
fetchSourceContext
public MultiGetRequest.Item fetchSourceContext(FetchSourceContext fetchSourceContext)
Allows setting theFetchSourceContext
for this request, controlling if and how _source should be returned.
-
readItem
public static MultiGetRequest.Item readItem(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-