public interface IndexResolver
IndexResolver finds those IndexDefinitions to be created for a given class.
The IndexResolver considers index annotations like Indexed, GeoSpatialIndexed,
HashIndexed, TextIndexed and WildcardIndexed on properties as well as CompoundIndex
and WildcardIndexed on types.
Unless specified otherwise the index name will be created out of the keys/path involved in the index.
TextIndexed properties are collected into a single index that covers the detected fields.
Map like structures, unless annotated with WildcardIndexed, are skipped because the
map key, which cannot be resolved from static metadata, needs to be part of the
index.
| Modifier and Type | Method and Description |
|---|---|
static IndexResolver |
create(MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
Creates a new
IndexResolver given MongoMappingContext. |
default Iterable<? extends IndexDefinition> |
resolveIndexFor(Class<?> entityType)
Find and create
IndexDefinitions for properties of given TypeInformation. |
Iterable<? extends IndexDefinition> |
resolveIndexFor(TypeInformation<?> typeInformation)
Find and create
IndexDefinitions for properties of given TypeInformation. |
static IndexResolver create(MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
IndexResolver given MongoMappingContext.mappingContext - must not be null.IndexResolver.Iterable<? extends IndexDefinition> resolveIndexFor(TypeInformation<?> typeInformation)
IndexDefinitions for properties of given TypeInformation. IndexDefinitions
are created for properties and types with Indexed, CompoundIndexes or GeoSpatialIndexed.typeInformation - must not be null.Iterable in case no IndexDefinition could be resolved for type.default Iterable<? extends IndexDefinition> resolveIndexFor(Class<?> entityType)
IndexDefinitions for properties of given TypeInformation. IndexDefinitions
are created for properties and types with Indexed, CompoundIndexes or GeoSpatialIndexed.entityType - must not be null.Iterable in case no IndexDefinition could be resolved for type.2.2Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.