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
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionaddFieldName
(String field) Adds a field namefield
to the list of fields to load.addFieldNames
(List<String> fieldNames) Adds the field namesfieldNames
to the list of fields to load.boolean
boolean
Returns 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 StoredFieldsContext
static StoredFieldsContext
fromRestRequest
(String name, RestRequest request) static StoredFieldsContext
fromXContent
(String fieldName, XContentParser parser) int
hashCode()
void
toXContent
(String preferredName, XContentBuilder builder) void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
_NONE_
- See Also:
-
-
Constructor Details
-
StoredFieldsContext
-
StoredFieldsContext
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
fieldNames
Gets the field names to load and return as part of the search request. -
addFieldNames
Adds the field namesfieldNames
to the list of fields to load. -
addFieldName
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
-
hashCode
public int hashCode() -
toXContent
- Throws:
IOException
-
fromList
-
fromXContent
public static StoredFieldsContext fromXContent(String fieldName, XContentParser parser) throws IOException - Throws:
IOException
-
fromRestRequest
-