Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9772

FieldSortValues should reuse comparator and only invalidate leafComparator

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 6.4, 7.0
    • Component/s: search
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      In QueryComponent.doFieldSortValues when there are multiple leafs a comparator and leafComparator is made for each document instead of creating a common comparator and making as different leafs are visited.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user johnthcall opened a pull request:

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

          SOLR-9772 FieldSortValues should reuse comparator and only invalidate leafComparator

          No need to recreate the comparator as leaf changes. There was a bug where lastIdx was not set and was recreating the comparator and re-initializing the leafComparator for each document.

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

          $ git pull https://github.com/johnthcall/lucene-solr patch-1

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

          https://github.com/apache/lucene-solr/pull/115.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 #115


          commit 8a47601e0f42563c1d45c3049d21194505b1a89d
          Author: John Call <johncall@microsoft.com>
          Date: 2016-11-15T20:37:37Z

          SOLR-9772 FieldSortValues should reuse comparator and only invalidate leafComparator


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user johnthcall opened a pull request: https://github.com/apache/lucene-solr/pull/115 SOLR-9772 FieldSortValues should reuse comparator and only invalidate leafComparator No need to recreate the comparator as leaf changes. There was a bug where lastIdx was not set and was recreating the comparator and re-initializing the leafComparator for each document. You can merge this pull request into a Git repository by running: $ git pull https://github.com/johnthcall/lucene-solr patch-1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/115.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 #115 commit 8a47601e0f42563c1d45c3049d21194505b1a89d Author: John Call <johncall@microsoft.com> Date: 2016-11-15T20:37:37Z SOLR-9772 FieldSortValues should reuse comparator and only invalidate leafComparator
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 738198ef34b694a2a3ff8d48d5ae8a50ca34c803 in lucene-solr's branch refs/heads/master from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=738198e ]

          SOLR-9772: reuse comparator when deriving fieldSortValues

          Show
          jira-bot ASF subversion and git services added a comment - Commit 738198ef34b694a2a3ff8d48d5ae8a50ca34c803 in lucene-solr's branch refs/heads/master from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=738198e ] SOLR-9772 : reuse comparator when deriving fieldSortValues
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit e525cca0173c019448fd158b785aa8f4b06c1985 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e525cca ]

          SOLR-9772: reuse comparator when deriving fieldSortValues

          Show
          jira-bot ASF subversion and git services added a comment - Commit e525cca0173c019448fd158b785aa8f4b06c1985 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e525cca ] SOLR-9772 : reuse comparator when deriving fieldSortValues
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Committed. Thanks!

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Committed. Thanks!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user johnthcall closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user johnthcall closed the pull request at: https://github.com/apache/lucene-solr/pull/115

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              johncall John Call
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development