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

ConstantScoreQuery looses explain details of wrapped query

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      Right now the ConstantScoreWeigth used by the ConstantScoreQuery is not adding the details of the wrapped query to the explanation.

      if (exists) {
          return Explanation.match(score, getQuery().toString() + (score == 1f ? "" : "^" + score));
      } else {
          return Explanation.noMatch(getQuery().toString() + " doesn't match id " + doc);
      }
      

      This is kind of inconvenient as it makes it kind of hard to figure out which term finally really matched when one e.g. puts a BooleanQuery into the FILTER clause of another BooleanQuery.

      Attachments

        Activity

          People

            Unassigned Unassigned
            christianziech Christian Ziech
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: