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

Speed up ToParentBlockJoinQuery when total hit count is not needed

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.1, 9.0
    • None
    • None
    • New

    Description

      We spotted a regression on nested queries in the Elastisearch nightly track:
      https://elasticsearch-benchmarks.elastic.co/index.html#tracks/nested/nightly/30d
      It seems related to the fact that we propagate the TOP_SCORES score mode to the child query even though we don't compute a max score in the BlockJoinScorer and don't propagate the minimum score either. Since it is not possible to compute a max score for a document that depends on other documents (the children) we should probably force the score mode to COMPLETE to build the child scorer. This should avoid the overhead of loading and reading the impacts. It should also be possible to early terminate queries that use the ScoreMode.None mode since in this case the score of each parent document is the same.

      Attachments

        1. LUCENE-8701.patch
          9 kB
          Jim Ferenczi
        2. LUCENE-8701.patch
          13 kB
          Jim Ferenczi

        Activity

          People

            Unassigned Unassigned
            jim.ferenczi Jim Ferenczi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: