Suggested by Guillaume Smet
Instead of having this:
We would have this:
Which makes more sense, since the options available to configure the index "Book" actually depend on the backend in which this index is defined.
As a bonus it also feels more "tidy" since the index properties are nested under the right backend. It's particularly visible in a YAML configuration, like in Spring Boot:
However, in order for this to be possible, we will need to change how we configure an index to point to a certain backend. Currently this is done in the configuration:
Which obviously makes no sense if the index properties are nested under the backend name.
One solution would be to configure the targeted backend in the mapper:
The default (when the "backend" attribute is not defined) being to rely on hibernate.search.default_backend.