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

Allow registering Analyzer definitions at bootstrap via an extension point


    • Type: New Feature
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 5.7.0.Final
    • Components: engine, integration
    • Labels:


      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.


          Issue links



              • Assignee:
                yrodiere Yoann Rodière
                sanne Sanne Grinovero
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: