Lucene - Core
  1. Lucene - Core
  2. LUCENE-6691

tweak SortingMergePolicy.getSortDescription

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Minor 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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          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
          ASF GitHub Bot added a comment -

          Github user cpoerschke closed the pull request at:

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

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

          Bulk close for 5.3.0 release

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development