Package org.elasticsearch.search.fetch
Class StoredFieldsContext
java.lang.Object
org.elasticsearch.search.fetch.StoredFieldsContext
- All Implemented Interfaces:
Writeable
public class StoredFieldsContext extends java.lang.Object implements 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 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, org.elasticsearch.common.xcontent.XContentParser parser)
int
hashCode()
void
toXContent(java.lang.String preferredName, org.elasticsearch.common.xcontent.XContentBuilder builder)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_NONE_
public static final java.lang.String _NONE_- See Also:
- Constant Field Values
-
-
Constructor Details
-
StoredFieldsContext
-
StoredFieldsContext
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
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
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
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, org.elasticsearch.common.xcontent.XContentBuilder builder) throws java.io.IOException- Throws:
java.io.IOException
-
fromList
-
fromXContent
public static StoredFieldsContext fromXContent(java.lang.String fieldName, org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
fromRestRequest
-