We're updating the issue view to help you get more done. 

Make the index defaults backend-scoped

Description

Currently if we do this:

1 2 3 hibernate.search.backends.backend1.type = elasticsearch hibernate.search.backends.backend2.type = lucene hibernate.search.indexes.default.foo = bar

Then the value for property "foo" will be applied to all indexes regardless of their backend.

I doubt this is wise: if we end up with multiple properties with the same name in different backends, this may lead to unexpected results, or simply to failing bootstrap because value "bar" sense for one backend type but not for another.

If we were to us per-backend index defaults, on the other hand:

1 2 3 4 hibernate.search.backends.backend1.type = elasticsearch hibernate.search.backends.backend1.index_defaults.foo = bar hibernate.search.backends.backend2.type = lucene hibernate.search.backends.backend2.index_defaults.foo = fubar

... then no confusion would be possible. And this syntax would not be much worse for users who only have one backend.

Also, this syntax would remove the problems users may face when they have multiple indexes and name one of them "default" (this index's configuration will be automatically used as a default for all other indexes...).

Note that in order to introduce this syntax, we would have make the setting for the "default backend" a separate property, e.g.:

1 2 3 4 5 hibernate.search.default_backend = backend1 hibernate.search.backends.backend1.type = elasticsearch hibernate.search.backends.backend1.index_defaults.foo = bar hibernate.search.backends.backend2.type = lucene hibernate.search.backends.backend2.index_defaults.foo = fubar

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major