Interface IndexDefinitionContributor

All Known Implementing Classes:
DynamicModelIndexDefinitionContributor

@NullMarked public interface IndexDefinitionContributor
Contributes index definitions that are not declared as annotated Java interfaces, for example definitions derived from runtime metadata. Implementations are Spring beans. They are consulted every time IndexConfigurationManager builds the index configurations of a metadata generation, so a contribution must describe the entities and properties of the generation that is pinned or current for the calling thread.
  • Method Details

    • getIndexDefinitions

      Collection<ContributedIndexDefinition> getIndexDefinitions()
      Returns the definitions to add. A definition for an entity that also has an annotated Java definition is appended to it: contributed fields that are not already mapped are added, fields already mapped by the Java definition are kept as they are. A definition for an entity without a Java definition creates a new index configuration.
      Returns:
      contributed definitions, empty when there is nothing to contribute