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.
  • Field Details

  • Constructor Details

    • StoredFieldsContext

      public StoredFieldsContext​(StoredFieldsContext other)
    • StoredFieldsContext

      public StoredFieldsContext​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • fieldNames

      public java.util.List<java.lang.String> fieldNames()
      Gets the field names to load and return as part of the search request.
    • addFieldNames

      public StoredFieldsContext addFieldNames​(java.util.List<java.lang.String> fieldNames)
      Adds the field names fieldNames to the list of fields to load.
    • addFieldName

      public StoredFieldsContext addFieldName​(java.lang.String field)
      Adds a field name field 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 class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.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

      public static StoredFieldsContext fromList​(java.util.List<java.lang.String> fieldNames)
    • fromXContent

      public static StoredFieldsContext fromXContent​(java.lang.String fieldName, org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • fromRestRequest

      public static StoredFieldsContext fromRestRequest​(java.lang.String name, RestRequest request)