Module org.elasticsearch.server
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 addedlookupSupplier- a supplier for a SearchLookup to be used by runtime scriptssourcePathsLookup- a function to get source paths for a specific fieldfielddataOperation- the operation used to determine data structures to generate fielddata from
public record FieldDataContext(String fullyQualifiedIndexName, IndexSettings indexSettings, Supplier<SearchLookup> lookupSupplier, Function<String,Set<String>> sourcePathsLookup, MappedFieldType.FielddataOperation fielddataOperation)
extends Record
Holds context information for the construction of FieldData
-
Constructor Summary
ConstructorsConstructorDescriptionFieldDataContext(String fullyQualifiedIndexName, IndexSettings indexSettings, Supplier<SearchLookup> lookupSupplier, Function<String, Set<String>> sourcePathsLookup, MappedFieldType.FielddataOperation fielddataOperation) Creates an instance of aFieldDataContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefielddataOperationrecord component.Returns the value of thefullyQualifiedIndexNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theindexSettingsrecord component.Returns the value of thelookupSupplierrecord component.static FieldDataContextnoRuntimeFields(String reason) A context to use when runtime fields are not available Used for validating index sorts, eager global ordinal loading, etcReturns the value of thesourcePathsLookuprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FieldDataContext
public FieldDataContext(String fullyQualifiedIndexName, IndexSettings indexSettings, Supplier<SearchLookup> lookupSupplier, Function<String, Set<String>> sourcePathsLookup, MappedFieldType.FielddataOperation fielddataOperation) Creates an instance of aFieldDataContextrecord class.- Parameters:
fullyQualifiedIndexName- the value for thefullyQualifiedIndexNamerecord componentindexSettings- the value for theindexSettingsrecord componentlookupSupplier- the value for thelookupSupplierrecord componentsourcePathsLookup- the value for thesourcePathsLookuprecord componentfielddataOperation- the value for thefielddataOperationrecord component
-
-
Method Details
-
noRuntimeFields
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
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
fullyQualifiedIndexName
Returns the value of thefullyQualifiedIndexNamerecord component.- Returns:
- the value of the
fullyQualifiedIndexNamerecord component
-
indexSettings
Returns the value of theindexSettingsrecord component.- Returns:
- the value of the
indexSettingsrecord component
-
lookupSupplier
Returns the value of thelookupSupplierrecord component.- Returns:
- the value of the
lookupSupplierrecord component
-
sourcePathsLookup
Returns the value of thesourcePathsLookuprecord component.- Returns:
- the value of the
sourcePathsLookuprecord component
-
fielddataOperation
Returns the value of thefielddataOperationrecord component.- Returns:
- the value of the
fielddataOperationrecord component
-