Uploaded image for project: 'Hibernate Search'
  1. Hibernate Search
  2. HSEARCH-2418

Allow registering Analyzer definitions at bootstrap via an extension point

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.0.Final
    • Component/s: engine, integration
    • Labels:
      None

      Description

      Currently the Analyzers are being looked up by name, but the name map is built by Hibernate Search itself according to its configuration and @AnalyzerDef annotations.

      Other frameworks, Infinispan Query as a concrete case, might want to provide additional means for defining analyzers. We decided at a face to face meeting that the simplest solution would be to make our "Analyzer Map" a Service contract, so that they can inject their own instance to override the current one, which would be promoted to "default implementation".

      The interface definition looks like trivial; we need to make sure however that we consistently use this and keep in mind that the Map is a concurrent service, which might be updated by external parties at runtime.

      I suspect - and hope - that we'll be able to agree that such updates can only be additive: i.e. adding a new name/analyzer couple would be fine, but changing or removing the mapping of a previously defined name is more problematic without introducing some locking mechanism.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: