Make the "default" configuration for backends/indexes/etc. a separate property

Description

*TO BE DISCUSSED, DO NOT IMPLEMENT RIGHT AWAY*

For example instead of writing this:

# Sets the default for all indexes hibernate.search.indexes.default.backend = myDefaultBackend # Override the default hibernate.search.indexes.myIndex1.backend = myOtherBackend

We would write this:

# Sets the default for all indexes hibernate.search.indexes-defaults.backend = myDefaultBackend # Override the default hibernate.search.indexes.myIndex1.backend = myOtherBackend

With this syntax, we could even, at some point in the future, consider per-backend defaults:

# Sets the default for all indexes of backend "myBackend" hibernate.search.backends.myBackend.type = ... hibernate.search.backends.myBackend.indexes-defaults.someBackendSpecificProperty = ... # Override the default hibernate.search.indexes.myIndex1.backend = myBackend hibernate.search.indexes.myIndex1.someBackendSpecificProperty = ...

The main advantage is that there could not be any confusion anymore where the user names one of his indexes "default" and upon configuring it, all other indexes have their configuration suddenly change.

The main drawback is that users migrating from Search 5 would very likely forget to move their "hibernate.search.index.default." properties to "hibernate.search.indexes-defaults.", and leave it as "hibernate.search.indexes.default.*", which would just configure a non-existing index named "default". This could, however, be caught by the unused configuration property detection implemented in HSEARCH-1869.

Activity

Show:

Yoann RodièreJanuary 18, 2019 at 3:01 PM

Duplicates HSEARCH-3451, which has already been fixed.

Duplicate

Details

Assignee

Reporter

Priority

Created August 28, 2018 at 7:26 AM
Updated January 18, 2019 at 3:01 PM
Resolved January 18, 2019 at 3:01 PM

Flag notifications