Record Class FieldDataContext

java.lang.Object
java.lang.Record
org.elasticsearch.index.fielddata.FieldDataContext
Record Components:
fullyQualifiedIndexName - the index name with any remote index information added
lookupSupplier - a supplier for a SearchLookup to be used by runtime scripts
sourcePathsLookup - a function to get source paths for a specific field
fielddataOperation - the operation used to determine data structures to generate fielddata from

public record FieldDataContext(String fullyQualifiedIndexName, Supplier<SearchLookup> lookupSupplier, Function<String,Set<String>> sourcePathsLookup, MappedFieldType.FielddataOperation fielddataOperation) extends Record
Holds context information for the construction of FieldData
  • Constructor Details

  • Method Details

    • noRuntimeFields

      public static FieldDataContext noRuntimeFields(String reason)
      A context to use when runtime fields are not available Used for validating index sorts, eager global ordinal loading, etc
      Parameters:
      reason - the reason that runtime fields are not supported
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fullyQualifiedIndexName

      public String fullyQualifiedIndexName()
      Returns the value of the fullyQualifiedIndexName record component.
      Returns:
      the value of the fullyQualifiedIndexName record component
    • lookupSupplier

      public Supplier<SearchLookup> lookupSupplier()
      Returns the value of the lookupSupplier record component.
      Returns:
      the value of the lookupSupplier record component
    • sourcePathsLookup

      public Function<String,Set<String>> sourcePathsLookup()
      Returns the value of the sourcePathsLookup record component.
      Returns:
      the value of the sourcePathsLookup record component
    • fielddataOperation

      public MappedFieldType.FielddataOperation fielddataOperation()
      Returns the value of the fielddataOperation record component.
      Returns:
      the value of the fielddataOperation record component