Class IndexNameTypeNameMapping
java.lang.Object
org.hibernate.search.backend.elasticsearch.mapping.impl.IndexNameTypeNameMapping
- All Implemented Interfaces:
TypeNameMapping
Rely on the "_index" meta-field to resolve the type name.
Does not work with index aliases.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDocumentMetadataContributor(String mappedTypeName) onStart(IndexLayoutStrategy indexLayoutStrategy) voidregister(IndexNames indexNames, String mappedTypeName) Register a new index => type mapping.
-
Constructor Details
-
IndexNameTypeNameMapping
public IndexNameTypeNameMapping()
-
-
Method Details
-
getIndexSchemaRootContributor
- Specified by:
getIndexSchemaRootContributorin interfaceTypeNameMapping- Returns:
- A schema contributor for the required additional properties (type name, ...), or an empty optional.
-
getDocumentMetadataContributor
- Specified by:
getDocumentMetadataContributorin interfaceTypeNameMapping- 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
- Specified by:
getImplicitFieldContributorin interfaceTypeNameMapping- Returns:
- A field contributor for the additional implicit properties (_entity_type, ...), or an empty optional.
-
onStart
- Specified by:
onStartin interfaceTypeNameMapping- Returns:
- A helper for projections that need to extract the mapped type name from search hits.
-
register
Description copied from interface:TypeNameMappingRegister a new index => type mapping.- Specified by:
registerin interfaceTypeNameMapping- Parameters:
indexNames- The names of the index.mappedTypeName- The name of the type mapped to the index.
-