Package org.elasticsearch.search.fetch
Class StoredFieldsContext
- java.lang.Object
-
- org.elasticsearch.search.fetch.StoredFieldsContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_NONE_
-
Constructor Summary
Constructors Constructor Description StoredFieldsContext(StreamInput in)
StoredFieldsContext(StoredFieldsContext other)
-
Method Summary
Modifier and Type Method Description StoredFieldsContext
addFieldName(java.lang.String field)
Adds a field namefield
to the list of fields to load.StoredFieldsContext
addFieldNames(java.util.List<java.lang.String> fieldNames)
Adds the field namesfieldNames
to the list of fields to load.boolean
equals(java.lang.Object o)
boolean
fetchFields()
Returns true if the stored fields should be fetched, false otherwise.java.util.List<java.lang.String>
fieldNames()
Gets the field names to load and return as part of the search request.static StoredFieldsContext
fromList(java.util.List<java.lang.String> fieldNames)
static StoredFieldsContext
fromRestRequest(java.lang.String name, RestRequest request)
static StoredFieldsContext
fromXContent(java.lang.String fieldName, XContentParser parser)
int
hashCode()
void
toXContent(java.lang.String preferredName, XContentBuilder builder)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
-
-
Field Detail
-
_NONE_
public static final java.lang.String _NONE_
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StoredFieldsContext
public StoredFieldsContext(StoredFieldsContext other)
-
StoredFieldsContext
public StoredFieldsContext(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
fieldNames
public java.util.List<java.lang.String> fieldNames()
Gets the field names to load and return as part of the search request.
-
addFieldNames
public StoredFieldsContext addFieldNames(java.util.List<java.lang.String> fieldNames)
Adds the field namesfieldNames
to the list of fields to load.
-
addFieldName
public StoredFieldsContext addFieldName(java.lang.String field)
Adds a field namefield
to the list of fields to load.
-
fetchFields
public boolean fetchFields()
Returns true if the stored fields should be fetched, false otherwise.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toXContent
public void toXContent(java.lang.String preferredName, XContentBuilder builder) throws java.io.IOException
- Throws:
java.io.IOException
-
fromList
public static StoredFieldsContext fromList(java.util.List<java.lang.String> fieldNames)
-
fromXContent
public static StoredFieldsContext fromXContent(java.lang.String fieldName, XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
fromRestRequest
public static StoredFieldsContext fromRestRequest(java.lang.String name, RestRequest request)
-
-