Lucene - Core
  1. Lucene - Core
  2. LUCENE-4774

Add FieldComparator that allows sorting parent docs based on field inside the child docs

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3, 6.0
    • Component/s: modules/join
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      A field comparator for sorting block join parent docs based on the a field in the associated child docs.

      1. LUCENE-4774.patch
        33 kB
        Martijn van Groningen
      2. LUCENE-4774.patch
        33 kB
        Martijn van Groningen
      3. LUCENE-4774.patch
        14 kB
        Martijn van Groningen

        Issue Links

          Activity

          Hide
          Martijn van Groningen added a comment -

          Initial patch. No tests.

          Show
          Martijn van Groningen added a comment - Initial patch. No tests.
          Hide
          Martijn van Groningen added a comment -

          Updated patch. Added tests and jdocs. I will commit this soon.

          Show
          Martijn van Groningen added a comment - Updated patch. Added tests and jdocs. I will commit this soon.
          Hide
          Robert Muir added a comment -

          can you fix the license header on TestBlockJoinSorting when committing? It has an ES license

          Show
          Robert Muir added a comment - can you fix the license header on TestBlockJoinSorting when committing? It has an ES license
          Hide
          Martijn van Groningen added a comment - - edited

          Oops... This was the result of copying an ES test! I've changed it.
          I didn't ran ant precommit yet, I expect it would fail.

          Show
          Martijn van Groningen added a comment - - edited Oops... This was the result of copying an ES test! I've changed it. I didn't ran ant precommit yet, I expect it would fail.
          Hide
          Robert Muir added a comment -

          I expect it would too... but it wasn't. I fixed it to be pickier here.

          Show
          Robert Muir added a comment - I expect it would too... but it wasn't. I fixed it to be pickier here.
          Hide
          Martijn van Groningen added a comment -

          Thanks for making rat pickier!

          Show
          Martijn van Groningen added a comment - Thanks for making rat pickier!
          Hide
          Martijn van Groningen added a comment -

          Committed to trunk and 4x branche.

          Show
          Martijn van Groningen added a comment - Committed to trunk and 4x branche.
          Hide
          Uwe Schindler added a comment -

          Closed after release.

          Show
          Uwe Schindler added a comment - Closed after release.
          Hide
          Mikhail Khludnev added a comment -

          fwiw something like http://www.gossamer-threads.com/lists/lucene/java-dev/199372?do=post_view_threaded happens to me

          NOTE: reproduce with: ant test -Dtestcase=TestBlockJoinSorting -Dtests.method=testNestedSorting -Dtests.seed=FB4F1BE85579255B -Dtests.slow=true -Dtests.locale=da_DK -Dtests.timezone=Asia/Qatar -Dtests.file.encoding=UTF-8
          NOTE: test params are: codec=Asserting, sim=RandomSimilarityProvider(queryNorm=true,coord=crazy): {}, locale=da_DK, timezone=Asia/Qatar
          NOTE: Linux 2.6.32-131.0.15.el6.x86_64 amd64/Sun Microsystems Inc. 1.6.0_29 (64-bit)/cpus=4,threads=1,free=317130512,total=349241344
          NOTE: All tests run in this JVM: [TestJoinUtil, TestBlockJoin, TestBlockJoinSorting]

          -------------------------------------------------------------------------------
          Test set: org.apache.lucene.search.join.TestBlockJoinSorting
          -------------------------------------------------------------------------------
          Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec <<< FAILURE!
          testNestedSorting(org.apache.lucene.search.join.TestBlockJoinSorting) Time elapsed: 0.021 sec <<< FAILURE!
          java.lang.AssertionError: expected:<3> but was:<28>
          at __randomizedtesting.SeedInfo.seed([FB4F1BE85579255B:F3A6F6A915D02835]:0)
          at org.junit.Assert.fail(Assert.java:93)
          at org.junit.Assert.failNotEquals(Assert.java:647)
          at org.junit.Assert.assertEquals(Assert.java:128)
          at org.junit.Assert.assertEquals(Assert.java:472)
          at org.junit.Assert.assertEquals(Assert.java:456)
          at org.apache.lucene.search.join.TestBlockJoinSorting.testNestedSorting(TestBlockJoinSorting.java:226)

          Show
          Mikhail Khludnev added a comment - fwiw something like http://www.gossamer-threads.com/lists/lucene/java-dev/199372?do=post_view_threaded happens to me NOTE: reproduce with: ant test -Dtestcase=TestBlockJoinSorting -Dtests.method=testNestedSorting -Dtests.seed=FB4F1BE85579255B -Dtests.slow=true -Dtests.locale=da_DK -Dtests.timezone=Asia/Qatar -Dtests.file.encoding=UTF-8 NOTE: test params are: codec=Asserting, sim=RandomSimilarityProvider(queryNorm=true,coord=crazy): {}, locale=da_DK, timezone=Asia/Qatar NOTE: Linux 2.6.32-131.0.15.el6.x86_64 amd64/Sun Microsystems Inc. 1.6.0_29 (64-bit)/cpus=4,threads=1,free=317130512,total=349241344 NOTE: All tests run in this JVM: [TestJoinUtil, TestBlockJoin, TestBlockJoinSorting] ------------------------------------------------------------------------------- Test set: org.apache.lucene.search.join.TestBlockJoinSorting ------------------------------------------------------------------------------- Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.06 sec <<< FAILURE! testNestedSorting(org.apache.lucene.search.join.TestBlockJoinSorting) Time elapsed: 0.021 sec <<< FAILURE! java.lang.AssertionError: expected:<3> but was:<28> at __randomizedtesting.SeedInfo.seed( [FB4F1BE85579255B:F3A6F6A915D02835] :0) at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:472) at org.junit.Assert.assertEquals(Assert.java:456) at org.apache.lucene.search.join.TestBlockJoinSorting.testNestedSorting(TestBlockJoinSorting.java:226)
          Hide
          Hoss Man added a comment -

          Mikhail: can you please open a new bug with the details of your test failure – specifically: what branch/revision you are testing and whether or not that seed reproduces for you.

          (it's not really appropriate to comment on closed issues that added features with concerns about bugs in that feature – that's what Jira issue linking can be helpful for).

          Show
          Hoss Man added a comment - Mikhail: can you please open a new bug with the details of your test failure – specifically: what branch/revision you are testing and whether or not that seed reproduces for you. (it's not really appropriate to comment on closed issues that added features with concerns about bugs in that feature – that's what Jira issue linking can be helpful for).
          Hide
          Mikhail Khludnev added a comment -

          fyi

          Show
          Mikhail Khludnev added a comment - fyi

            People

            • Assignee:
              Martijn van Groningen
              Reporter:
              Martijn van Groningen
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development