Interface TypeNameMapping

All Known Implementing Classes:
DiscriminatorTypeNameMapping, IndexNameTypeNameMapping

public interface TypeNameMapping
Regroups behavior related to how type names are assigned to index documents.
  • Method Details

    • getIndexSchemaRootContributor

      Optional<IndexSchemaRootContributor> getIndexSchemaRootContributor()
      Returns:
      A schema contributor for the required additional properties (type name, ...), or an empty optional.
    • getDocumentMetadataContributor

      Optional<DocumentMetadataContributor> getDocumentMetadataContributor(String mappedTypeName)
      Parameters:
      mappedTypeName - The name of the type mapped to the index.
      Returns:
      A document metadata contributor for the required additional properties (type name, ...), or an empty optional.
    • getImplicitFieldContributor

      Optional<ImplicitFieldContributor> getImplicitFieldContributor()
      Returns:
      A field contributor for the additional implicit properties (_entity_type, ...), or an empty optional.
    • onStart

      ProjectionExtractionHelper<String> onStart(IndexLayoutStrategy indexLayoutStrategy)
      Returns:
      A helper for projections that need to extract the mapped type name from search hits.
    • register

      void register(IndexNames indexNames, String mappedTypeName)
      Register a new index => type mapping.
      Parameters:
      indexNames - The names of the index.
      mappedTypeName - The name of the type mapped to the index.