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

Allow to assign a name to an analyzer class/instance

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 6.0.0.Alpha4
    • Components: engine
    • Labels:
      None

      Description

      As highlighted in this SO question: http://stackoverflow.com/questions/40928584/use-existing-analyzer-in-hibernate-search-analyzerdiscriminator

      Not being able to associated an existing Analyzer class, for example org.apache.lucene.analysis.cjk.CJKAnalyzer to a "definition name", preculeds it from being used in some contexts, for example via @AnalyzerDiscriminator.

      We have several alternative solutions.

      • allow @AnalyzerDef to refer to an Analyzer class (how to handle the either/or of the various attributes? looks bad).
      • allow the discriminator to return the class instance (horrible, and doesn't resolve the problem for possible other needs of named analyzers)
      • allow defining name/class pairs in the configuration properties?

      I think I prefer the 3rd option, but I also have the feeling that @AnalyzerDef isn't "complete" without this capability as it's not symmetric with the dual-capability of @Analyzer.

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              sanne Sanne Grinovero
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: