Interface TypeNameMapping
- All Known Implementing Classes:
DiscriminatorTypeNameMapping,IndexNameTypeNameMapping
public interface TypeNameMapping
Regroups behavior related to how type names are assigned to index documents.
-
Method Summary
Modifier and TypeMethodDescriptiongetDocumentMetadataContributor(String mappedTypeName) onStart(IndexLayoutStrategy indexLayoutStrategy) voidregister(IndexNames indexNames, String mappedTypeName) Register a new index => type mapping.
-
Method Details
-
getIndexSchemaRootContributor
Optional<IndexSchemaRootContributor> getIndexSchemaRootContributor()- Returns:
- A schema contributor for the required additional properties (type name, ...), or an empty optional.
-
getDocumentMetadataContributor
- 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
- Returns:
- A helper for projections that need to extract the mapped type name from search hits.
-
register
Register a new index => type mapping.- Parameters:
indexNames- The names of the index.mappedTypeName- The name of the type mapped to the index.
-