Lucene - Core
  1. Lucene - Core
  2. LUCENE-4486

Highlighter doesn't support ConstantScoreQuery

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.1, 4.0
    • Fix Version/s: 4.1, 6.0
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      if you wrap a query into a constant score the highlighter fails to highlight since ConstantScoreQuery is not recognized in WeightedSpanTermExtractor

      1. LUCENE-4486.patch
        3 kB
        Simon Willnauer

        Activity

        Hide
        Simon Willnauer added a comment -

        here is a patch incl. test & changes entry

        Show
        Simon Willnauer added a comment - here is a patch incl. test & changes entry
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Simon Willnauer added a comment -

        committed to trunk in revision 1399205.
        backported to 4.x in revision 1399207.

        Show
        Simon Willnauer added a comment - committed to trunk in revision 1399205. backported to 4.x in revision 1399207.
        Hide
        Ahmet Arslan added a comment -

        I am wondering about if it is possible to enable highlighter support for SrndQuery and ComplexPhraseQuery by using this patch's solution?

        Show
        Ahmet Arslan added a comment - I am wondering about if it is possible to enable highlighter support for SrndQuery and ComplexPhraseQuery by using this patch's solution?
        Hide
        Simon Willnauer added a comment -

        I am wondering about if it is possible to enable highlighter support for SrndQuery and ComplexPhraseQuery by using this patch's solution?

        I'd think so. I'm just not sure if those should be added really. It seems they should be translated to other/more core queries first?

        Show
        Simon Willnauer added a comment - I am wondering about if it is possible to enable highlighter support for SrndQuery and ComplexPhraseQuery by using this patch's solution? I'd think so. I'm just not sure if those should be added really. It seems they should be translated to other/more core queries first?
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Simon Willnauer
        http://svn.apache.org/viewvc?view=revision&revision=1399207

        LUCENE-4486: Add support for ConstantScoreQuery in Highlighter.

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Simon Willnauer http://svn.apache.org/viewvc?view=revision&revision=1399207 LUCENE-4486 : Add support for ConstantScoreQuery in Highlighter.

          People

          • Assignee:
            Simon Willnauer
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development