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 aFieldDataContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefielddataOperation
record component.Returns the value of thefullyQualifiedIndexName
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theindexSettings
record component.Returns the value of thelookupSupplier
record component.static FieldDataContext
noRuntimeFields
(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 thesourcePathsLookup
record component.final String
toString()
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 aFieldDataContext
record class.- Parameters:
fullyQualifiedIndexName
- the value for thefullyQualifiedIndexName
record componentindexSettings
- the value for theindexSettings
record componentlookupSupplier
- the value for thelookupSupplier
record componentsourcePathsLookup
- the value for thesourcePathsLookup
record componentfielddataOperation
- the value for thefielddataOperation
record 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 thefullyQualifiedIndexName
record component.- Returns:
- the value of the
fullyQualifiedIndexName
record component
-
indexSettings
Returns the value of theindexSettings
record component.- Returns:
- the value of the
indexSettings
record component
-
lookupSupplier
Returns the value of thelookupSupplier
record component.- Returns:
- the value of the
lookupSupplier
record component
-
sourcePathsLookup
Returns the value of thesourcePathsLookup
record component.- Returns:
- the value of the
sourcePathsLookup
record component
-
fielddataOperation
Returns the value of thefielddataOperation
record component.- Returns:
- the value of the
fielddataOperation
record component
-