Lucene - Core
  1. Lucene - Core
  2. LUCENE-5225

ToParentBlockJoinQuery don't accumulate the child doc ids and scores if ToParentBlockJoinCollector is not used

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.6, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The BlockJoinScorer temporarily saves the child docids and scores in two arrays (pendingChildDocs/pendingChildScores) for the current block (parent/child docs) being processed. This is only need for ToParentBlockJoinCollector and in the case that this collector isn't used then these two arrays shouldn't be used as well.

      I've seen cases where only the ToParentBlockJoinQuery is used and there are many child docs (100k and up), in that case these two arrays are a waste of resources.

      1. LUCENE-5225.patch
        4 kB
        Martijn van Groningen
      2. LUCENE-5225.patch
        12 kB
        Martijn van Groningen

        Activity

        Hide
        Martijn van Groningen added a comment -

        Added boolean option to ToParentBlockJoinQuery that controls whether the two arrays are being used.

        Not really happy with this approach... too many if statements, perhaps there should be a dedicated ToParentBlockJoinQuery impl for ToParentBlockJoinCollector.

        Show
        Martijn van Groningen added a comment - Added boolean option to ToParentBlockJoinQuery that controls whether the two arrays are being used. Not really happy with this approach... too many if statements, perhaps there should be a dedicated ToParentBlockJoinQuery impl for ToParentBlockJoinCollector.
        Hide
        Martijn van Groningen added a comment -

        I like this patch more. Not tracking pending child is now much less messy.

        Show
        Martijn van Groningen added a comment - I like this patch more. Not tracking pending child is now much less messy.
        Hide
        ASF subversion and git services added a comment -

        Commit 1527975 from Martijn van Groningen in branch 'dev/trunk'
        [ https://svn.apache.org/r1527975 ]

        LUCENE-5225: The ToParentBlockJoinQuery only keeps tracks of the the child doc ids and child scores if the ToParentBlockJoinCollector is used.

        Show
        ASF subversion and git services added a comment - Commit 1527975 from Martijn van Groningen in branch 'dev/trunk' [ https://svn.apache.org/r1527975 ] LUCENE-5225 : The ToParentBlockJoinQuery only keeps tracks of the the child doc ids and child scores if the ToParentBlockJoinCollector is used.
        Hide
        ASF subversion and git services added a comment -

        Commit 1528022 from Martijn van Groningen in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1528022 ]

        LUCENE-5225: backported r1527975

        Show
        ASF subversion and git services added a comment - Commit 1528022 from Martijn van Groningen in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1528022 ] LUCENE-5225 : backported r1527975
        Hide
        Martijn van Groningen added a comment -

        Committed to 4x and trunk.

        Show
        Martijn van Groningen added a comment - Committed to 4x and trunk.

          People

          • Assignee:
            Martijn van Groningen
            Reporter:
            Martijn van Groningen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development