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

WeightedSpanTermExtractor unnexessarily enforces rewrite for some SpanQueiries

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.4, 7.3.1, 7.5, 7.6
    • Fix Version/s: None
    • Component/s: modules/highlighter
    • Labels:
    • Lucene Fields:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated: