Currently you can't access the backend/index from the ORM mapper, which is a bit annoying since it prevents from accessing the Elasticsearch REST client, in particular.
Ideally, we should probably introduce a public API representing the mapping ({{SearchMapping}}) accessible through either {{Search.mapping(entityManagerFactory)}} or {{Search.mapping(entityManager)}}. Then we would declare in {{SearchMapping}} a {{getBackend(String backendName)}} method and a {{getIndexManager(String indexName)}} method. The best candidate for implementing {{SearchMapping}} is probably {{HibernateOrmMapping}}. |
|