Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.0, 6.5
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      git diff --stat master...
       .../spans/NearSpansUnordered.java       | 211 ++++---------
       1 file changed, 59 insertions(+), 152 deletions(-)
      
      1. LUCENE-7715.patch
        10 kB
        Paul Elschot

        Activity

        Hide
        jpountz Adrien Grand added a comment -

        I haven't tried the patch, but I don't see how it deals with the initial state that all sub spans have a start position of -1. In master currently, nextStartPosition iterates over the pq until the start position of the top element is greater than -1, but I don't see that logic in your patch. There is a startDocument method but if I am not mistaken it is only called from two-phase iteration, so if NearSpansUnordered are consumed directly, that would work, but not if they are nested within other spans? (I'm not very familiar with spans so I could easily miss something.)

        Show
        jpountz Adrien Grand added a comment - I haven't tried the patch, but I don't see how it deals with the initial state that all sub spans have a start position of -1. In master currently, nextStartPosition iterates over the pq until the start position of the top element is greater than -1, but I don't see that logic in your patch. There is a startDocument method but if I am not mistaken it is only called from two-phase iteration, so if NearSpansUnordered are consumed directly, that would work, but not if they are nested within other spans? (I'm not very familiar with spans so I could easily miss something.)
        Hide
        paul.elschot@xs4all.nl Paul Elschot added a comment -

        ... how it deals with the initial state that all sub spans have a start position of -1.

        There is no need for that, the intermediate data structure is a priority queue that is not a Spans itself.

        If the names of this priority queue (SpanTotalLengthEndPositionWindow) and its methods (startDocument/nextPosition) are misleading, they need to be improved.

        The core search tests and precommit pass.

        Show
        paul.elschot@xs4all.nl Paul Elschot added a comment - ... how it deals with the initial state that all sub spans have a start position of -1. There is no need for that, the intermediate data structure is a priority queue that is not a Spans itself. If the names of this priority queue (SpanTotalLengthEndPositionWindow) and its methods (startDocument/nextPosition) are misleading, they need to be improved. The core search tests and precommit pass.
        Hide
        jpountz Adrien Grand added a comment -

        OK, I just applied the patch to understand how it works. It looks good to me, I'll merge it soon. Thanks Paul!

        Show
        jpountz Adrien Grand added a comment - OK, I just applied the patch to understand how it works. It looks good to me, I'll merge it soon. Thanks Paul!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 780690b1e9fe9b029ee15cdf81d1f697e2fe4cc7 in lucene-solr's branch refs/heads/branch_6x from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=780690b ]

        LUCENE-7715: NearSpansUnordered simplifications.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 780690b1e9fe9b029ee15cdf81d1f697e2fe4cc7 in lucene-solr's branch refs/heads/branch_6x from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=780690b ] LUCENE-7715 : NearSpansUnordered simplifications.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 3087eb50066ce9335012b718a310249ac5b9ce5c in lucene-solr's branch refs/heads/master from Adrien Grand
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3087eb5 ]

        LUCENE-7715: NearSpansUnordered simplifications.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 3087eb50066ce9335012b718a310249ac5b9ce5c in lucene-solr's branch refs/heads/master from Adrien Grand [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3087eb5 ] LUCENE-7715 : NearSpansUnordered simplifications.
        Hide
        paul.elschot@xs4all.nl Paul Elschot added a comment -

        Thanks Adrien.

        Show
        paul.elschot@xs4all.nl Paul Elschot added a comment - Thanks Adrien.

          People

          • Assignee:
            Unassigned
            Reporter:
            paul.elschot@xs4all.nl Paul Elschot
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development