java.lang.Object
org.elasticsearch.search.fetch.StoredFieldsContext
- All Implemented Interfaces:
Writeable
Context used to fetch the
stored_fields.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFieldName(String field) Adds a field namefieldto the list of fields to load.addFieldNames(List<String> fieldNames) Adds the field namesfieldNamesto the list of fields to load.booleanbooleanReturns true if the stored fields should be fetched, false otherwise.Gets the field names to load and return as part of the search request.static StoredFieldsContextstatic StoredFieldsContextfromRestRequest(String name, RestRequest request) static StoredFieldsContextfromXContent(String fieldName, XContentParser parser) inthashCode()static StoredFieldsContextvoidtoXContent(String preferredName, XContentBuilder builder) voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
_NONE_
- See Also:
-
-
Constructor Details
-
StoredFieldsContext
public StoredFieldsContext(boolean fetchFields) -
StoredFieldsContext
-
StoredFieldsContext
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
fieldNames
Gets the field names to load and return as part of the search request. -
addFieldNames
Adds the field namesfieldNamesto the list of fields to load. -
addFieldName
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. -
equals
-
hashCode
public int hashCode() -
toXContent
- Throws:
IOException
-
metadataOnly
-
fromList
-
fromXContent
public static StoredFieldsContext fromXContent(String fieldName, XContentParser parser) throws IOException - Throws:
IOException
-
fromRestRequest
-