Interface SearchIndexDefinition

All Known Implementing Classes:
VectorIndex

public interface SearchIndexDefinition
Definition for an Atlas Search Index (Search Index or Vector Index).
Since:
4.5
Author:
Marcin Grzejszczak, Mark Paluch
  • Method Details

    • getName

      String getName()
      Returns:
      the name of the index.
    • getType

      String getType()
      Returns:
      the type of the index. Typically, search or vectorSearch.
    • getRawIndexDocument

      default org.bson.Document getRawIndexDocument()
      Returns the index document for this index without any potential entity context resolving field name mappings. The resulting document contains the index name, type and definition.
      Returns:
      never null.
    • getIndexDocument

      default org.bson.Document getIndexDocument(@Nullable TypeInformation<?> entity, @Nullable MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
      Returns the index document for this index in the context of a potential entity to resolve field name mappings. The resulting document contains the index name, type and definition.
      Parameters:
      entity - can be null.
      mappingContext -
      Returns:
      never null.
    • getDefinition

      org.bson.Document getDefinition(@Nullable TypeInformation<?> entity, @Nullable MappingContext<? extends MongoPersistentEntity<?>,MongoPersistentProperty> mappingContext)
      Returns the actual index definition for this index in the context of a potential entity to resolve field name mappings. Entity and context can be null to create a generic index definition without applying field name mapping.
      Parameters:
      entity - can be null.
      mappingContext - can be null.
      Returns:
      never null.