Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.Alpha2
    • Component/s: engine
    • Labels:
      None

      Description

      Currently if we do this:

      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:

      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.:

      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
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                yrodiere Yoann Rodière
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: