Class StoredFieldsContext

  • All Implemented Interfaces:
    Writeable

    public class StoredFieldsContext
    extends java.lang.Object
    implements Writeable
    Context used to fetch the stored_fields.
    • Constructor Detail

      • StoredFieldsContext

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

      • 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,
                               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,
                                                       XContentParser parser)
                                                throws java.io.IOException
        Throws:
        java.io.IOException