Interface HibernateSearchStandaloneBuildTimeConfig.MappingConfig

Enclosing interface:
HibernateSearchStandaloneBuildTimeConfig

public static interface HibernateSearchStandaloneBuildTimeConfig.MappingConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    One or more xref:hibernate-search-standalone-elasticsearch.adoc#bean-reference-note-anchor[bean references] to the component(s) used to configure the Hibernate Search mapping, in particular programmatically.
    The structure of the Hibernate Search entity mapping.
  • Method Details

    • configurer

      Optional<List<String>> configurer()
      One or more xref:hibernate-search-standalone-elasticsearch.adoc#bean-reference-note-anchor[bean references] to the component(s) used to configure the Hibernate Search mapping, in particular programmatically. The referenced beans must implement `StandalonePojoMappingConfigurer`. See xref:hibernate-search-standalone-elasticsearch.adoc#programmatic-mapping[Programmatic mapping] for an example on how mapping configurers can be used to apply programmatic mappings. [NOTE] ==== Instead of setting this configuration property, you can simply annotate your custom `StandalonePojoMappingConfigurer` implementations with `@SearchExtension` and leave the configuration property unset: Hibernate Search will use the annotated implementation automatically. See xref:hibernate-search-standalone-elasticsearch.adoc#plugging-in-custom-components[this section] for more information. If this configuration property is set, it takes precedence over any `@SearchExtension` annotation. ====
    • structure

      @WithDefault("graph") MappingStructure structure()
      The structure of the Hibernate Search entity mapping. This must match the structure of the application model being indexed with Hibernate Search: `graph` (default):: Entities indexed through Hibernate Search are nodes in an entity graph, i.e. an indexed entity is independent of other entities it references through associations, which *can* be updated independently of the indexed entity. + Associations between entities must be bi-directional: specifying the inverse side of associations through `@AssociationInverseSide` *is required*, unless reindexing is disabled for that association through `@IndexingDependency(reindexOnUpdate = ...)`. `document`:: Entities indexed through Hibernate Search are the root of a document, i.e. an indexed entity "owns" other entities it references through associations, which *cannot* be updated independently of the indexed entity. + Associations between entities can be uni-directional: specifying the inverse side of associations through `@AssociationInverseSide` *is not required*. See also link:{hibernate-search-docs-url}#mapping-reindexing-associationinverseside[`@AssociationInverseSide`] link:{hibernate-search-docs-url}#mapping-reindexing-reindexonupdate[`@IndexingDependency(reindexOnUpdate = ...)`].