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>
-
-
Constructor Summary
Constructors Constructor Description StoredFieldsContext(StreamInput in)StoredFieldsContext(StoredFieldsContext other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StoredFieldsContextaddFieldName(String field)Adds a field namefieldto the list of fields to load.StoredFieldsContextaddFieldNames(List<String> fieldNames)Adds the field namesfieldNamesto the list of fields to load.booleanequals(Object o)booleanfetchFields()Returns true if the stored fields should be fetched, false otherwise.List<String>fieldNames()Gets the field names to load and return as part of the search request.static StoredFieldsContextfromList(List<String> fieldNames)static StoredFieldsContextfromRestRequest(String name, RestRequest request)static StoredFieldsContextfromXContent(String fieldName, XContentParser parser)inthashCode()voidtoXContent(String preferredName, XContentBuilder builder)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
-
-
Field Detail
-
_NONE_
public static final String _NONE_
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StoredFieldsContext
public StoredFieldsContext(StoredFieldsContext other)
-
StoredFieldsContext
public StoredFieldsContext(StreamInput in) throws IOException
- Throws:
IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
fieldNames
public List<String> fieldNames()
Gets the field names to load and return as part of the search request.
-
addFieldNames
public StoredFieldsContext addFieldNames(List<String> fieldNames)
Adds the field namesfieldNamesto the list of fields to load.
-
addFieldName
public StoredFieldsContext addFieldName(String field)
Adds a field namefieldto the list of fields to load.
-
fetchFields
public boolean fetchFields()
Returns true if the stored fields should be fetched, false otherwise.
-
toXContent
public void toXContent(String preferredName, XContentBuilder builder) throws IOException
- Throws:
IOException
-
fromList
public static StoredFieldsContext fromList(List<String> fieldNames)
-
fromXContent
public static StoredFieldsContext fromXContent(String fieldName, XContentParser parser) throws IOException
- Throws:
IOException
-
fromRestRequest
public static StoredFieldsContext fromRestRequest(String name, RestRequest request)
-
-