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

QueryScorer.init returns empty TokenStream if setMaxDocCharsToAnalyze is not previously called

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.4
    • Fix Version/s: None
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is a regression since Lucene 4.10 regarding The QueryScorer class in the Highlighter module.

      In 4.10, the QueryScorer.init method returns a working tokenStream even if the maxCharsToAnalyze variable is set to zero. In both versions, zero is the default value and in 4.10 it indicated that the entire stream should be returned, not an empty stream.

      The problem is with the WeightedSpanTermExtractor always wrapping the tokenStream in a OffsetLimitTokenFilter filter, even when the passed down maxDocCharsToAnalyze variable is zero.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jvstein Jeff Stein
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: