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

ToParentBlockJoinQuery deothogonalization

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.9
    • None
    • modules/join
    • None
    • New

    Description

      For now ToParentBlockJoinQuery accepts only child
      documents. Before (LUCENE-4968) passing parent document to TPBJQ lead to
      undefined behavior and garbage in results, unfortunately it also affects
      TPBJQ.advance(). After pointed patch IllegalStateException is
      thrown when this occurs.

      So we must always take parent-child relations into account while writing
      queries. At most of time it is necessary when writing a query, but sometimes,
      filters can be independent of data model (for example, ACL filters:
      +TPBJQ +allowed:user).

      TPBJQ shall returns parent doc if parent doc is passed to TPBJQ.advance()
      or returned from childScorer.advance(). This change doesn't break anything:
      results will be absolutely the same for parent-child orthogonal queries.

      In few words: Document matching parent filter should be parent of itself.

      Attachments

        1. LUCENE-5816.patch
          6 kB
          Nikolay Khitrin
        2. LUCENE-5816.patch
          8 kB
          Nikolay Khitrin

        Activity

          People

            Unassigned Unassigned
            khitrin Nikolay Khitrin
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: