Source:
public void configure(HibernateOrmMappingDefinitionContainerContext context) { ProgrammaticMappingDefinitionContext mapping = context.programmaticMapping(); mapping.type( IndexedEntity.class ) .indexed( IndexedEntity.INDEX ) .bridge( new CustomTypeBridge.Builder() .objectName( "customBridgeOnClass" ) ) .property( "id" ) .documentId() .property( "text" ) .genericField( "myTextField" ) .property( "embedded" ) .indexedEmbedded() .prefix( "embedded.prefix_" ) .maxDepth( 1 ) .includePaths( "customBridgeOnClass.text", "embedded.prefix_customBridgeOnClass.text" ); ProgrammaticMappingDefinitionContext secondMapping = context.programmaticMapping(); secondMapping.type( ParentIndexedEntity.class ) .property( "localDate" ) .genericField( "myLocalDateField" ) .property( "embedded" ) .bridge( new CustomPropertyBridge.Builder() .objectName( "customBridgeOnProperty" ) ); secondMapping.type( OtherIndexedEntity.class ) .indexed( OtherIndexedEntity.INDEX ) .property( "id" ) .documentId().identifierBridge( DefaultIntegerIdentifierBridge.class ) .property( "numeric" ) .genericField() .genericField( "numericAsString" ).valueBridge( IntegerAsStringValueBridge.class ); secondMapping.type( YetAnotherIndexedEntity.class ) .indexed( YetAnotherIndexedEntity.INDEX ) .property( "id" ) .documentId() .property( "numeric" ) .genericField() .property( "embeddedList" ) .indexedEmbedded() .prefix( "embeddedList.otherPrefix_" ) .includePaths( "embedded.prefix_customBridgeOnClass.text" ) .property( "embeddedMap" ) .genericField( "embeddedMapKeys" ).withExtractor( BuiltinContainerExtractor.MAP_KEY.getType() ) .indexedEmbedded().includePaths( "embedded.prefix_myLocalDateField" ); }

Target:
public void configure(HibernateOrmMappingDefinitionContainerContext context) { ProgrammaticMappingDefinitionContext mapping = context.programmaticMapping(); mapping.type( IndexedEntity.class ) .indexed( IndexedEntity.INDEX ) .bridge( new CustomTypeBridge.Builder() .objectName( "customBridgeOnClass" ) ) .property( "id" ) .documentId() .property( "text" ) .genericField( "myTextField" ) .property( "embedded" ) .indexedEmbedded() .prefix( "embedded.prefix_" ) .maxDepth( 1 ) .includePaths( "customBridgeOnClass.text", "embedded.prefix_customBridgeOnClass.text" ); ProgrammaticMappingDefinitionContext secondMapping = context.programmaticMapping(); secondMapping.type( ParentIndexedEntity.class ) .property( "localDate" ) .genericField( "myLocalDateField" ) .property( "embedded" ) .bridge( new CustomPropertyBridge.Builder() .objectName( "customBridgeOnProperty" ) ); secondMapping.type( OtherIndexedEntity.class ) .indexed( OtherIndexedEntity.INDEX ) .property( "id" ) .documentId().identifierBridge( DefaultIntegerIdentifierBridge.class ) .property( "numeric" ) .genericField() .genericField( "numericAsString" ).valueBridge( IntegerAsStringValueBridge.class ); secondMapping.type( YetAnotherIndexedEntity.class ) .indexed( YetAnotherIndexedEntity.INDEX ) .property( "id" ) .documentId() .property( "numeric" ) .genericField() .property( "embeddedList" ) .indexedEmbedded() .prefix( "embeddedList.otherPrefix_" ) .includePaths( "embedded.prefix_customBridgeOnClass.text" ) .property( "embeddedMap" ) .genericField( "embeddedMapKeys" ).withExtractor( BuiltinContainerExtractor.MAP_KEY ) .indexedEmbedded().includePaths( "embedded.prefix_myLocalDateField" ); }