Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3665

Make WeightedSpanTermExtractor extensible to handle custom query implemenations

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5
    • 3.6, 4.0-ALPHA
    • modules/highlighter
    • None
    • New, Patch Available

    Description

      Currently if I have a custom query which subclasses query directly I can't use the QueryScorer for highlighting since it does explicit instanceof checks. In some cases its is possible to rewrite the query before passing it to the highlighter to obtain a primitive query. However I had the usecase where this was not possible ie. the original index was not available on the machine which highlights the results. To still use the highlighter I had to copy a bunch of code due to visibility issues in those classes. I think we can make this extensible with minor effort to allow this usecase without massive code duplication.

      Attachments

        1. LUCENE-3665.patch
          15 kB
          Simon Willnauer

        Activity

          People

            simonw Simon Willnauer
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: