Package org.elasticsearch.search.fetch
Class StoredFieldsContext
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
ConstructorsConstructorDescription -
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, org.elasticsearch.common.xcontent.XContentParser parser)inthashCode()voidtoXContent(String preferredName, org.elasticsearch.common.xcontent.XContentBuilder builder)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
_NONE_
- See Also:
- Constant Field Values
-
-
Constructor Details
-
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
public void toXContent(String preferredName, org.elasticsearch.common.xcontent.XContentBuilder builder) throws IOException- Throws:
IOException
-
fromList
-
fromXContent
public static StoredFieldsContext fromXContent(String fieldName, org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
fromRestRequest
-