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

WeightedSpanTermExtractor unnexessarily enforces rewrite for some SpanQueiries

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 7.4, 7.3.1, 7.5, 7.6
    • None
    • modules/highlighter
    • New

    Description

      Method mustRewriteQuery(SpanQuery) returns true for SpanPositionCheckQuery, SpanContainingQuery, SpanWithinQuery, and SpanBoostQuery, however, these queries do not require rewriting. One effect of this is e.g. that UnifiedHighlighter does not work with OffsetSource Postings and switches to Analysis which of course has consequences for performance.

      I attach a patch for lucene version 7.6.0. I have not checked whether it breaks existing unit tests.

      Attachments

        1. WeightedSpanTermExtractor.java
          26 kB
          Christoph Goller

        Issue Links

          Activity

            People

              Unassigned Unassigned
              goller@detego-software.de Christoph Goller
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: