Class DelegateDocValuesField

java.lang.Object
org.elasticsearch.script.field.DelegateDocValuesField
All Implemented Interfaces:
DocValuesField, Field

public class DelegateDocValuesField extends Object implements DocValuesField
A default Field to provide ScriptDocValues for fields that are not supported by the script fields api.
  • Constructor Details

    • DelegateDocValuesField

      public DelegateDocValuesField(ScriptDocValues<?> scriptDocValues, String name)
  • Method Details

    • setNextDocId

      public void setNextDocId(int docId) throws IOException
      Description copied from interface: DocValuesField
      Set the current document ID.
      Specified by:
      setNextDocId in interface DocValuesField
      Throws:
      IOException
    • getScriptDocValues

      public ScriptDocValues<?> getScriptDocValues()
      Description copied from interface: DocValuesField
      Returns a ScriptDocValues of the appropriate type for this field. This is used to support backwards compatibility for accessing field values through the doc variable.
      Specified by:
      getScriptDocValues in interface DocValuesField
    • getName

      public String getName()
      Description copied from interface: Field
      Returns the name of this field.
      Specified by:
      getName in interface Field
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Field
      Returns true if this field has no values, otherwise false.
      Specified by:
      isEmpty in interface Field
    • size

      public int size()
      Description copied from interface: Field
      Returns the number of values this field has.
      Specified by:
      size in interface Field
    • getValue

      public Object getValue(Object defaultValue)
    • getValues

      public List<?> getValues()