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

tweak SortingMergePolicy.getSortDescription

    Details

    • Type: Test
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Building tests for SOLR-5730 identified that early termination can be omitted for sorted segments because the LeafReader concerned is not a SegmentReader - github pull request to illustrate to follow:

      • the TestEarlyTerminatingSortingCollector.testTerminatedEarly test uses a wrapped reader in the same way as SolrIndexSearcher
      • the SortingMergePolicy.getSortDescription change (assuming it is a valid change to make) fixes that particular test only
      • ExitableDirectoryReader and UninvertingReader wrap could perhaps also be added in LuceneTestCase.wrapReader ?

      LUCENE-6065 "remove "foreign readers" from merge, fix LeafReader instead." also concerns SortingMergePolicy.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user cpoerschke opened a pull request:

          https://github.com/apache/lucene-solr/pull/191

          LUCENE-6691: tweak SortingMergePolicy.getSortDescription

          for https://issues.apache.org/jira/i#browse/LUCENE-6691

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/bloomberg/lucene-solr trunk-SortingMergePolicy-isSorted

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/lucene-solr/pull/191.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #191


          commit 4626b4977f384ce9dc103531ace566da17c93205
          Author: Christine Poerschke <cpoerschke@bloomberg.net>
          Date: 2015-07-16T19:42:21Z

          lucene: add EarlyTerminatingSortingCollector.terminatedEarly() method

          commit 6b7a11c0ced960f80152aed2c582cfaa6217c0af
          Author: Christine Poerschke <cpoerschke@bloomberg.net>
          Date: 2015-07-17T15:46:39Z

          lucene: add TestEarlyTerminatingSortingCollector.testTerminatedEarly()

          commit 2afd60f6d29b5d4759a3eaf6ed1aef22a368bedb
          Author: Christine Poerschke <cpoerschke@bloomberg.net>
          Date: 2015-07-20T12:54:04Z

          lucene: tweak SortingMergePolicy.getSortDescription(LeafReader reader)


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user cpoerschke opened a pull request: https://github.com/apache/lucene-solr/pull/191 LUCENE-6691 : tweak SortingMergePolicy.getSortDescription for https://issues.apache.org/jira/i#browse/LUCENE-6691 You can merge this pull request into a Git repository by running: $ git pull https://github.com/bloomberg/lucene-solr trunk-SortingMergePolicy-isSorted Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/191.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #191 commit 4626b4977f384ce9dc103531ace566da17c93205 Author: Christine Poerschke <cpoerschke@bloomberg.net> Date: 2015-07-16T19:42:21Z lucene: add EarlyTerminatingSortingCollector.terminatedEarly() method commit 6b7a11c0ced960f80152aed2c582cfaa6217c0af Author: Christine Poerschke <cpoerschke@bloomberg.net> Date: 2015-07-17T15:46:39Z lucene: add TestEarlyTerminatingSortingCollector.testTerminatedEarly() commit 2afd60f6d29b5d4759a3eaf6ed1aef22a368bedb Author: Christine Poerschke <cpoerschke@bloomberg.net> Date: 2015-07-20T12:54:04Z lucene: tweak SortingMergePolicy.getSortDescription(LeafReader reader)
          Hide
          mikemccand Michael McCandless added a comment -

          +1 to the patch, except remove that temporary System.out.println in SortingMergePolicy.java ...

          Christine Poerschke you can commit this one yourself now!

          Show
          mikemccand Michael McCandless added a comment - +1 to the patch, except remove that temporary System.out.println in SortingMergePolicy.java ... Christine Poerschke you can commit this one yourself now!
          Hide
          cpoerschke Christine Poerschke added a comment -

          Hi Michael McCandless - thanks for taking a look at the patch. Sure, will remove the temporary System.out.println and then commit myself!

          Show
          cpoerschke Christine Poerschke added a comment - Hi Michael McCandless - thanks for taking a look at the patch. Sure, will remove the temporary System.out.println and then commit myself!
          Hide
          cpoerschke Christine Poerschke added a comment -

          Err, relatively basic commit question. In CHANGES.txt where would this issue best be placed? I'm thinking 'Changes in Runtime Behavior' or perhaps 'Bug fixes' section?

          Show
          cpoerschke Christine Poerschke added a comment - Err, relatively basic commit question. In CHANGES.txt where would this issue best be placed? I'm thinking 'Changes in Runtime Behavior' or perhaps 'Bug fixes' section?
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1693892 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1693892 ]

          LUCENE-6691: SortingMergePolicy.(getSortDescription|isSorted) now considers FilterLeafReader instances. EarlyTerminatingSortingCollector.terminatedEarly accessor added. TestEarlyTerminatingSortingCollector.testTerminatedEarly test added.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1693892 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1693892 ] LUCENE-6691 : SortingMergePolicy.(getSortDescription|isSorted) now considers FilterLeafReader instances. EarlyTerminatingSortingCollector.terminatedEarly accessor added. TestEarlyTerminatingSortingCollector.testTerminatedEarly test added.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1693897 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1693897 ]

          LUCENE-6691: SortingMergePolicy.(getSortDescription|isSorted) now considers FilterLeafReader instances. EarlyTerminatingSortingCollector.terminatedEarly accessor added. TestEarlyTerminatingSortingCollector.testTerminatedEarly test added.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1693897 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1693897 ] LUCENE-6691 : SortingMergePolicy.(getSortDescription|isSorted) now considers FilterLeafReader instances. EarlyTerminatingSortingCollector.terminatedEarly accessor added. TestEarlyTerminatingSortingCollector.testTerminatedEarly test added.
          Hide
          cpoerschke Christine Poerschke added a comment -

          Have chosen 'Changes in Runtime Behavior' on the basis that the code is in 'misc' rather than 'core' and FilterLeafReader previously not being considered is not so much a bug but known-to-be-unsupported behavior. Happy to change to another section though if 'Changes in Runtime Behavior' was the wrong choice.

          Show
          cpoerschke Christine Poerschke added a comment - Have chosen 'Changes in Runtime Behavior' on the basis that the code is in 'misc' rather than 'core' and FilterLeafReader previously not being considered is not so much a bug but known-to-be-unsupported behavior. Happy to change to another section though if 'Changes in Runtime Behavior' was the wrong choice.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user cpoerschke commented on the pull request:

          https://github.com/apache/lucene-solr/pull/191#issuecomment-127661490

          Committed (yesterday) to trunk and branch_5x.

          Show
          githubbot ASF GitHub Bot added a comment - Github user cpoerschke commented on the pull request: https://github.com/apache/lucene-solr/pull/191#issuecomment-127661490 Committed (yesterday) to trunk and branch_5x.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user cpoerschke closed the pull request at:

          https://github.com/apache/lucene-solr/pull/191

          Show
          githubbot ASF GitHub Bot added a comment - Github user cpoerschke closed the pull request at: https://github.com/apache/lucene-solr/pull/191
          Hide
          shalinmangar Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

          Show
          shalinmangar Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

            People

            • Assignee:
              cpoerschke Christine Poerschke
              Reporter:
              cpoerschke Christine Poerschke
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development