Class DynamicModelIndexDefinitionContributor

java.lang.Object
io.jmix.dynmodel.search.DynamicModelIndexDefinitionContributor
All Implemented Interfaces:
IndexDefinitionContributor

public class DynamicModelIndexDefinitionContributor extends Object implements IndexDefinitionContributor
Contributes an index definition for every entity of the current metadata generation that has at least one dynamic attribute marked searchable. The definition lists exactly those attributes; the Search add-on adds the instance name itself.
  • Field Details

    • metadata

      @Autowired protected Metadata metadata
    • dynamicModelTools

      @Autowired protected DynamicModelTools dynamicModelTools
  • Constructor Details

    • DynamicModelIndexDefinitionContributor

      public DynamicModelIndexDefinitionContributor()
  • Method Details

    • getIndexDefinitions

      @NullMarked public Collection<ContributedIndexDefinition> getIndexDefinitions()
      Description copied from interface: IndexDefinitionContributor
      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.
      Specified by:
      getIndexDefinitions in interface IndexDefinitionContributor
      Returns:
      contributed definitions, empty when there is nothing to contribute