Lucene - Core
  1. Lucene - Core
  2. LUCENE-5099

QueryNode should have the ability to detach from its node parent

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.2, 4.3.1
    • Fix Version/s: 4.7
    • Component/s: core/queryparser
    • Labels:
      None

      Description

      QueryNodeProcessorImpl should always return the root of the tree after processing, so it needs to make the parent is set to null before returning. Otherwise, the previous parent is leaked and never removed.

        Activity

        Hide
        Adriano Crestani added a comment -

        After some investigation, I reached the conclusion that QueryNodeProcessorImpl should never take the decision of detaching the returned processed node from its parent. It should be up to the processor implementor logic or to the processor user to take that decision. For that reason, I have renamed this JIRA.

        Instead, we should add a method to QueryNode so the processor implementor or user could detach nodes from their parents.

        Show
        Adriano Crestani added a comment - After some investigation, I reached the conclusion that QueryNodeProcessorImpl should never take the decision of detaching the returned processed node from its parent. It should be up to the processor implementor logic or to the processor user to take that decision. For that reason, I have renamed this JIRA. Instead, we should add a method to QueryNode so the processor implementor or user could detach nodes from their parents.
        Hide
        Adriano Crestani added a comment -

        These are the proposed changes. I will commit in a couple of days if there are no objections.

        Show
        Adriano Crestani added a comment - These are the proposed changes. I will commit in a couple of days if there are no objections.
        Hide
        ASF subversion and git services added a comment -

        Commit 1560245 from Adriano Crestani in branch 'dev/trunk'
        [ https://svn.apache.org/r1560245 ]

        LUCENE-5099 - QueryNode should have the ability to detach from its node parent

        Show
        ASF subversion and git services added a comment - Commit 1560245 from Adriano Crestani in branch 'dev/trunk' [ https://svn.apache.org/r1560245 ] LUCENE-5099 - QueryNode should have the ability to detach from its node parent
        Hide
        ASF subversion and git services added a comment -

        Commit 1560246 from Adriano Crestani in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1560246 ]

        LUCENE-5099 - QueryNode should have the ability to detach from its node parent

        Show
        ASF subversion and git services added a comment - Commit 1560246 from Adriano Crestani in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1560246 ] LUCENE-5099 - QueryNode should have the ability to detach from its node parent

          People

          • Assignee:
            Adriano Crestani
            Reporter:
            Adriano Crestani
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development