Class IndexResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordInformation for resolving a field.static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndicesOptionsstatic final IndexResolver.OriginalIndexExtractorstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexResolutionmergedMappings(String indexPattern, boolean allowEmpty, IndexResolver.FieldsInfo fieldsInfo, boolean trackUnmappedFieldIndices, IndexResolver.OriginalIndexExtractor originalIndexExtractor) voidresolveFlatIndicesVersioned(boolean lenient, String indexPattern, String projectRouting, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, boolean hasTimeSeriesAggregation, boolean trackUnmappedFieldIndices, ActionListener<Versioned<IndexResolution>> listener) LikeIndexResolver#resolveIndicesVersionedbut for flat (CPS) queries.voidresolveLookupIndices(String indexPattern, Set<String> fieldNames, TransportVersion minimumVersion, ActionListener<IndexResolution> listener) LikeIndexResolver#resolveIndicesVersionedbut simplified and does not pass on the determined minimum transport version to the listener.voidresolveMainIndicesVersioned(String indexPattern, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, boolean hasTimeSeriesAggregation, boolean trackUnmappedFieldIndices, IndicesExpressionGrouper indicesExpressionGrouper, ActionListener<Versioned<IndexResolution>> listener) Perform a field caps request to resolve a pattern to one mapping (potentially compound, meaning it spans multiple indices).static EsFieldwrapIfPartiallyUnmapped(EsField field, String name, String fullName, Set<String> mappedIndices, int numberOfIndices) static EsFieldwrapIfPartiallyUnmapped(EsField field, String name, String fullName, Set<String> mappedIndices, int numberOfIndices, Map<Set<String>, Set<String>> indexDedupCache) static EsFieldstatic EsFieldwrapPartiallyUnmappedField(EsField field, String name, String fullName, Set<String> mappedIndices, Map<Set<String>, Set<String>> indexDedupCache)
-
Field Details
-
ALL_FIELDS
-
INDEX_METADATA_FIELD
-
UNMAPPED
- See Also:
-
DEFAULT_OPTIONS
-
DO_NOT_GROUP
-
-
Constructor Details
-
IndexResolver
-
-
Method Details
-
resolveLookupIndices
public void resolveLookupIndices(String indexPattern, Set<String> fieldNames, TransportVersion minimumVersion, ActionListener<IndexResolution> listener) LikeIndexResolver#resolveIndicesVersionedbut simplified and does not pass on the determined minimum transport version to the listener. -
resolveMainIndicesVersioned
public void resolveMainIndicesVersioned(String indexPattern, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, boolean hasTimeSeriesAggregation, boolean trackUnmappedFieldIndices, IndicesExpressionGrouper indicesExpressionGrouper, ActionListener<Versioned<IndexResolution>> listener) Perform a field caps request to resolve a pattern to one mapping (potentially compound, meaning it spans multiple indices).The field caps response contains the minimum transport version of all clusters that apply to the pattern, and it is used to deal with previously unsupported data types during resolution.
If a field's type is not supported on the minimum version, it will be
DataType.UNSUPPORTED.If the nodes are too old to include their minimum transport version in the field caps response, we'll assume
TransportVersion.minimumCompatible().The
minimumVersionalready known so far must be passed in and will be used instead of the minimum version from the field caps response if it is lower. During main index resolution, this is the local cluster's minimum version. This safeguards against using too new a version in case ofFROM remote_only:* | ...queries that don't have any indices on the local cluster.But it's also important for remote
ENRICHresolution, because in CCS enrich policies are resolved on remote clusters, so the overall minimum transport version that the coordinating cluster observed must be passed in here to avoid inconsistencies.The overall minimum version is updated using the field caps response and is passed on to the listener.
-
resolveFlatIndicesVersioned
public void resolveFlatIndicesVersioned(boolean lenient, String indexPattern, String projectRouting, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, boolean hasTimeSeriesAggregation, boolean trackUnmappedFieldIndices, ActionListener<Versioned<IndexResolution>> listener) LikeIndexResolver#resolveIndicesVersionedbut for flat (CPS) queries. Setlenientto allow targets to be missing — used forViewShadowRelationlookups, where finding nothing is the expected outcome when no remote project has an index matching the local view name.lenient=falseis the default for the strict main index resolution path. -
mergedMappings
public static IndexResolution mergedMappings(String indexPattern, boolean allowEmpty, IndexResolver.FieldsInfo fieldsInfo, boolean trackUnmappedFieldIndices, IndexResolver.OriginalIndexExtractor originalIndexExtractor) -
wrapIfPartiallyUnmapped
-
wrapIfPartiallyUnmapped
-
wrapPartiallyUnmappedField
-
wrapPartiallyUnmappedField
-