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, IndexResolver.FieldsInfo fieldsInfo, IndexResolver.OriginalIndexExtractor originalIndexExtractor) voidresolveFlatWorldIndicesVersioned(String indexPattern, String projectRouting, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, ActionListener<Versioned<IndexResolution>> listener) LikeIndexResolver#resolveIndicesVersionedbut for flat world queries.voidresolveIndices(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.voidresolveIndicesVersioned(String indexPattern, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, 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).
-
Field Details
-
ALL_FIELDS
-
INDEX_METADATA_FIELD
-
UNMAPPED
- See Also:
-
DEFAULT_OPTIONS
-
DO_NOT_GROUP
-
-
Constructor Details
-
IndexResolver
-
-
Method Details
-
resolveIndices
public void resolveIndices(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. -
resolveIndicesVersioned
public void resolveIndicesVersioned(String indexPattern, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, 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.
-
resolveFlatWorldIndicesVersioned
public void resolveFlatWorldIndicesVersioned(String indexPattern, String projectRouting, Set<String> fieldNames, QueryBuilder requestFilter, boolean includeAllDimensions, TransportVersion minimumVersion, boolean useAggregateMetricDoubleWhenNotSupported, boolean useDenseVectorWhenNotSupported, ActionListener<Versioned<IndexResolution>> listener) LikeIndexResolver#resolveIndicesVersionedbut for flat world queries. -
mergedMappings
public static IndexResolution mergedMappings(String indexPattern, IndexResolver.FieldsInfo fieldsInfo, IndexResolver.OriginalIndexExtractor originalIndexExtractor)
-