Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: master (7.0), 6.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      RangeField currently supports INTERSECTS, WITHIN, and CONTAINS query behavior. This feature adds support for an explicit CROSSES query. Unlike INTERSECT and OVERLAP queries the CROSSES query finds any indexed ranges whose interior (within range) intersect the interior AND exterior (outside range) of the query range.

      1. LUCENE-7449.patch
        23 kB
        Nicholas Knize
      2. LUCENE-7449.patch
        23 kB
        Nicholas Knize
      3. LUCENE-7449.patch
        20 kB
        Nicholas Knize

        Activity

        Hide
        nknize Nicholas Knize added a comment -

        Initial patch:

        • adds newCrossesQuery static method to IntRangeField, LongRangeField, FloatRangeField, and DoubleRangeField
        • simplifies leaf visit method to only compute necessary relations
        • adds CROSSES query to randomized tests
        • javadocs updated
        Show
        nknize Nicholas Knize added a comment - Initial patch: adds newCrossesQuery static method to IntRangeField , LongRangeField , FloatRangeField , and DoubleRangeField simplifies leaf visit method to only compute necessary relations adds CROSSES query to randomized tests javadocs updated
        Hide
        dsmiley David Smiley added a comment -

        Nice work Nick!

        • Most users will be wondering what the difference is between intersects & crosses. Can you either add an explanation or a URL reference to OGC/other specs? The 4-way int/long/float/double duplication makes this annoying I realize.
        • Looking at RangeFieldQuery.createWeight.IntersectVisitor.visit() I can't help but wonder if this should be a switch statement. Or perhaps instead, now that we are on Java 8, up front initialize a Lambda predicate function depending on the query type, so that visit() merely calls it with the leaf to know if it should should add the doc to the BulkAdder.

        example pseudocode:

        interface LeafPredicate { boolean test(final byte[] range); }
        // in buildMatchingDocIdSet:
        switch (queryType)
        case QueryType.WITHIN: predicate = target::contains
        
        Show
        dsmiley David Smiley added a comment - Nice work Nick! Most users will be wondering what the difference is between intersects & crosses. Can you either add an explanation or a URL reference to OGC/other specs? The 4-way int/long/float/double duplication makes this annoying I realize. Looking at RangeFieldQuery.createWeight.IntersectVisitor.visit() I can't help but wonder if this should be a switch statement. Or perhaps instead, now that we are on Java 8, up front initialize a Lambda predicate function depending on the query type, so that visit() merely calls it with the leaf to know if it should should add the doc to the BulkAdder. example pseudocode: interface LeafPredicate { boolean test(final byte[] range); } // in buildMatchingDocIdSet: switch (queryType) case QueryType.WITHIN: predicate = target::contains
        Hide
        nknize Nicholas Knize added a comment -

        Thanks for the suggestion David Smiley! And my apologies for the looong delay on this issue. I had to put it on the back burner but was recently able to get back to it. Your suggestion made it much cleaner, and easier to read, I think. I have attached an updated patch for review. Let me know if you have any thoughts and I'll get this closed up as soon as possible.

        Show
        nknize Nicholas Knize added a comment - Thanks for the suggestion David Smiley ! And my apologies for the looong delay on this issue. I had to put it on the back burner but was recently able to get back to it. Your suggestion made it much cleaner, and easier to read, I think. I have attached an updated patch for review. Let me know if you have any thoughts and I'll get this closed up as soon as possible.
        Hide
        nknize Nicholas Knize added a comment -

        Attached wrong patch... here's the correct one

        Show
        nknize Nicholas Knize added a comment - Attached wrong patch... here's the correct one
        Hide
        jpountz Adrien Grand added a comment -

        The patch looks good overall, just some minor style comments:

        • can you use IntPredicate rather than Predicate<Integer>?
        • can you move the big switch statement in visit(int docID, byte[] leaf) to the constructor of the IntersectVisitor so that we do not have to re-choose the appropriate predicate for every document?
        Show
        jpountz Adrien Grand added a comment - The patch looks good overall, just some minor style comments: can you use IntPredicate rather than Predicate<Integer> ? can you move the big switch statement in visit(int docID, byte[] leaf) to the constructor of the IntersectVisitor so that we do not have to re-choose the appropriate predicate for every document?
        Hide
        nknize Nicholas Knize added a comment -

        Thanks Adrien Grand! Great suggestions. I've tweaked a little bit and it reads even clearer than before. Updated patch is attached. Let me know what y'all think.

        Show
        nknize Nicholas Knize added a comment - Thanks Adrien Grand ! Great suggestions. I've tweaked a little bit and it reads even clearer than before. Updated patch is attached. Let me know what y'all think.
        Hide
        jpountz Adrien Grand added a comment -

        +1

        Show
        jpountz Adrien Grand added a comment - +1
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 6cbda026633ccd07c07e6db12561c0110a9eec4c in lucene-solr's branch refs/heads/master from Nicholas Knize
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6cbda02 ]

        LUCENE-7449: Add CROSSES relation support to RangeFieldQuery.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 6cbda026633ccd07c07e6db12561c0110a9eec4c in lucene-solr's branch refs/heads/master from Nicholas Knize [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=6cbda02 ] LUCENE-7449 : Add CROSSES relation support to RangeFieldQuery.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 0e24bfc053b3583b991212ff80623880049b4cf0 in lucene-solr's branch refs/heads/branch_6x from Nicholas Knize
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0e24bfc ]

        LUCENE-7449: Add CROSSES relation support to RangeFieldQuery.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 0e24bfc053b3583b991212ff80623880049b4cf0 in lucene-solr's branch refs/heads/branch_6x from Nicholas Knize [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0e24bfc ] LUCENE-7449 : Add CROSSES relation support to RangeFieldQuery.
        Hide
        mikemccand Michael McCandless added a comment -

        One of the ES Lucene jobs hit this test failure ... I haven't checked if it reproduces:

          [junit4] Suite: org.apache.lucene.search.TestDoubleRangeFieldQueries
           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestDoubleRangeFieldQueries -Dtests.method=testRandomTiny -Dtests.seed=792130AB9E891AA1 -Dtests.slow=true -Dtests.locale=nl -Dtests.timezone=Asia/Atyrau -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
           [junit4] FAILURE 0.04s J0 | TestDoubleRangeFieldQueries.testRandomTiny <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more):
           [junit4]    > FAIL (iter 6): id=0 should not match but did
           [junit4]    >  queryRange=Box(-8.542463800517043E307 TO 8.712902176567828E307)
           [junit4]    >  box=Box(-4.889774907987475E307 TO 7.344527517013989E306)
           [junit4]    >  queryType=CROSSES
           [junit4]    >  deleted?=false
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([792130AB9E891AA1:3066EEEDC0A8220D]:0)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomTiny(BaseRangeFieldQueryTestCase.java:64)
           [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
        
        Show
        mikemccand Michael McCandless added a comment - One of the ES Lucene jobs hit this test failure ... I haven't checked if it reproduces: [junit4] Suite: org.apache.lucene.search.TestDoubleRangeFieldQueries [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestDoubleRangeFieldQueries -Dtests.method=testRandomTiny -Dtests.seed=792130AB9E891AA1 -Dtests.slow=true -Dtests.locale=nl -Dtests.timezone=Asia/Atyrau -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 0.04s J0 | TestDoubleRangeFieldQueries.testRandomTiny <<< [junit4] > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more): [junit4] > FAIL (iter 6): id=0 should not match but did [junit4] > queryRange=Box(-8.542463800517043E307 TO 8.712902176567828E307) [junit4] > box=Box(-4.889774907987475E307 TO 7.344527517013989E306) [junit4] > queryType=CROSSES [junit4] > deleted?=false [junit4] > at __randomizedtesting.SeedInfo.seed([792130AB9E891AA1:3066EEEDC0A8220D]:0) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomTiny(BaseRangeFieldQueryTestCase.java:64) [junit4] > at java.lang.Thread.run(Thread.java:745)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 907c43ce7af389c42ef200e5c2ecefbc5eee8a7a in lucene-solr's branch refs/heads/master from Nicholas Knize
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=907c43c ]

        LUCENE-7449: Fix bug in RangeFieldQuery.scorer

        Show
        jira-bot ASF subversion and git services added a comment - Commit 907c43ce7af389c42ef200e5c2ecefbc5eee8a7a in lucene-solr's branch refs/heads/master from Nicholas Knize [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=907c43c ] LUCENE-7449 : Fix bug in RangeFieldQuery.scorer
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit e426ec4f7a254d532b75d5663f71fb97dcc386ac in lucene-solr's branch refs/heads/branch_6x from Nicholas Knize
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e426ec4 ]

        LUCENE-7449: Fix bug in RangeFieldQuery.scorer

        Show
        jira-bot ASF subversion and git services added a comment - Commit e426ec4f7a254d532b75d5663f71fb97dcc386ac in lucene-solr's branch refs/heads/branch_6x from Nicholas Knize [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e426ec4 ] LUCENE-7449 : Fix bug in RangeFieldQuery.scorer
        Hide
        nknize Nicholas Knize added a comment -

        Thanks Michael McCandless! Bone head logic issue on my part. I pushed a fix!

        Show
        nknize Nicholas Knize added a comment - Thanks Michael McCandless ! Bone head logic issue on my part. I pushed a fix!
        Hide
        steve_rowe Steve Rowe added a comment -

        My Jenkins found a reproducing seed for Test*RangeFieldQueries.testRandomMedium() failures on master:

        Checking out Revision 99e8ef2304b67712d45a2393e649c5319aaac972 (refs/remotes/origin/master)
        [...]
           [junit4] Suite: org.apache.lucene.search.TestFloatRangeFieldQueries
           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestFloatRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=pl -Dtests.timezone=Asia/Tashkent -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
           [junit4] FAILURE 2.92s J5 | TestFloatRangeFieldQueries.testRandomMedium <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more):
           [junit4]    > FAIL (iter 109): id=58400 should not match but did
           [junit4]    >  queryRange=Box(-Infinity TO Infinity)
           [junit4]    >  box=Box(-2.0156091E37 TO 2.682437E37)
           [junit4]    >  queryType=CROSSES
           [junit4]    >  deleted?=false
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68)
        [...]
           [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{floatRangeField=DocValuesFormat(name=Lucene70), id=DocValuesFormat(name=Lucene70)}, maxPointsInLeafNode=515, maxMBSortInHeap=7.111516888261523, sim=RandomSimilarity(queryNorm=true): {}, locale=pl, timezone=Asia/Tashkent
           [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=312749496,total=518520832
        
           [junit4] Suite: org.apache.lucene.search.TestIntRangeFieldQueries
           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestIntRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=es-US -Dtests.timezone=Japan -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
           [junit4] FAILURE 2.66s J3 | TestIntRangeFieldQueries.testRandomMedium <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more):
           [junit4]    > FAIL (iter 109): id=58400 should not match but did
           [junit4]    >  queryRange=Box(-2147483648 TO 2147483647)
           [junit4]    >  box=Box(-1750884627 TO 1582552779)
           [junit4]    >  queryType=CROSSES
           [junit4]    >  deleted?=false
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68)
        [...]
           [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{id=DocValuesFormat(name=Lucene70), intRangeField=DocValuesFormat(name=Lucene70)}, maxPointsInLeafNode=292, maxMBSortInHeap=5.691258113834367, sim=RandomSimilarity(queryNorm=false): {}, locale=es-US, timezone=Japan
           [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=266157456,total=484442112
        
           [junit4] Suite: org.apache.lucene.search.TestDoubleRangeFieldQueries
           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestDoubleRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=lt -Dtests.timezone=Etc/GMT-9 -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
           [junit4] FAILURE 2.65s J4 | TestDoubleRangeFieldQueries.testRandomMedium <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more):
           [junit4]    > FAIL (iter 109): id=58400 should not match but did
           [junit4]    >  queryRange=Box(-Infinity TO Infinity)
           [junit4]    >  box=Box(2.61936228581431E306 TO 2.3853375991516536E307)
           [junit4]    >  queryType=CROSSES
           [junit4]    >  deleted?=false
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68)
        [...]
           [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=Asserting)}, docValues:{doubleRangeField=DocValuesFormat(name=Memory), id=DocValuesFormat(name=Asserting)}, maxPointsInLeafNode=240, maxMBSortInHeap=7.1595337324364365, sim=RandomSimilarity(queryNorm=true): {}, locale=lt, timezone=Etc/GMT-9
           [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=174911880,total=478150656
        
           [junit4] Suite: org.apache.lucene.search.TestLongRangeFieldQueries
           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestLongRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=zh-TW -Dtests.timezone=America/Glace_Bay -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
           [junit4] FAILURE 3.01s J1 | TestLongRangeFieldQueries.testRandomMedium <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more):
           [junit4]    > FAIL (iter 109): id=58400 should not match but did
           [junit4]    >  queryRange=Box(-9223372036854775808 TO 9223372036854775807)
           [junit4]    >  box=Box(4074122573524489931 TO 8939705075662823149)
           [junit4]    >  queryType=CROSSES
           [junit4]    >  deleted?=false
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158)
           [junit4]    > 	at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68)
        [...]
           [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70), sim=RandomSimilarity(queryNorm=false): {}, locale=zh-TW, timezone=America/Glace_Bay
           [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=255599584,total=520093696
        
        Show
        steve_rowe Steve Rowe added a comment - My Jenkins found a reproducing seed for Test*RangeFieldQueries.testRandomMedium() failures on master: Checking out Revision 99e8ef2304b67712d45a2393e649c5319aaac972 (refs/remotes/origin/master) [...] [junit4] Suite: org.apache.lucene.search.TestFloatRangeFieldQueries [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestFloatRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=pl -Dtests.timezone=Asia/Tashkent -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 2.92s J5 | TestFloatRangeFieldQueries.testRandomMedium <<< [junit4] > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more): [junit4] > FAIL (iter 109): id=58400 should not match but did [junit4] > queryRange=Box(-Infinity TO Infinity) [junit4] > box=Box(-2.0156091E37 TO 2.682437E37) [junit4] > queryType=CROSSES [junit4] > deleted?=false [junit4] > at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68) [...] [junit4] 2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{floatRangeField=DocValuesFormat(name=Lucene70), id=DocValuesFormat(name=Lucene70)}, maxPointsInLeafNode=515, maxMBSortInHeap=7.111516888261523, sim=RandomSimilarity(queryNorm=true): {}, locale=pl, timezone=Asia/Tashkent [junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=312749496,total=518520832 [junit4] Suite: org.apache.lucene.search.TestIntRangeFieldQueries [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestIntRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=es-US -Dtests.timezone=Japan -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 2.66s J3 | TestIntRangeFieldQueries.testRandomMedium <<< [junit4] > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more): [junit4] > FAIL (iter 109): id=58400 should not match but did [junit4] > queryRange=Box(-2147483648 TO 2147483647) [junit4] > box=Box(-1750884627 TO 1582552779) [junit4] > queryType=CROSSES [junit4] > deleted?=false [junit4] > at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68) [...] [junit4] 2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{id=DocValuesFormat(name=Lucene70), intRangeField=DocValuesFormat(name=Lucene70)}, maxPointsInLeafNode=292, maxMBSortInHeap=5.691258113834367, sim=RandomSimilarity(queryNorm=false): {}, locale=es-US, timezone=Japan [junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=266157456,total=484442112 [junit4] Suite: org.apache.lucene.search.TestDoubleRangeFieldQueries [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestDoubleRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=lt -Dtests.timezone=Etc/GMT-9 -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 2.65s J4 | TestDoubleRangeFieldQueries.testRandomMedium <<< [junit4] > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more): [junit4] > FAIL (iter 109): id=58400 should not match but did [junit4] > queryRange=Box(-Infinity TO Infinity) [junit4] > box=Box(2.61936228581431E306 TO 2.3853375991516536E307) [junit4] > queryType=CROSSES [junit4] > deleted?=false [junit4] > at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68) [...] [junit4] 2> NOTE: test params are: codec=Asserting(Lucene70): {id=PostingsFormat(name=Asserting)}, docValues:{doubleRangeField=DocValuesFormat(name=Memory), id=DocValuesFormat(name=Asserting)}, maxPointsInLeafNode=240, maxMBSortInHeap=7.1595337324364365, sim=RandomSimilarity(queryNorm=true): {}, locale=lt, timezone=Etc/GMT-9 [junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=174911880,total=478150656 [junit4] Suite: org.apache.lucene.search.TestLongRangeFieldQueries [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestLongRangeFieldQueries -Dtests.method=testRandomMedium -Dtests.seed=3621B4BA98A607A1 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=zh-TW -Dtests.timezone=America/Glace_Bay -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 3.01s J1 | TestLongRangeFieldQueries.testRandomMedium <<< [junit4] > Throwable #1: java.lang.AssertionError: wrong hit (first of possibly more): [junit4] > FAIL (iter 109): id=58400 should not match but did [junit4] > queryRange=Box(-9223372036854775808 TO 9223372036854775807) [junit4] > box=Box(4074122573524489931 TO 8939705075662823149) [junit4] > queryType=CROSSES [junit4] > deleted?=false [junit4] > at __randomizedtesting.SeedInfo.seed([3621B4BA98A607A1:8BFF8312D9C364C7]:0) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.verify(BaseRangeFieldQueryTestCase.java:287) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.doTestRandom(BaseRangeFieldQueryTestCase.java:158) [junit4] > at org.apache.lucene.search.BaseRangeFieldQueryTestCase.testRandomMedium(BaseRangeFieldQueryTestCase.java:68) [...] [junit4] 2> NOTE: test params are: codec=Asserting(Lucene70), sim=RandomSimilarity(queryNorm=false): {}, locale=zh-TW, timezone=America/Glace_Bay [junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=255599584,total=520093696
        Hide
        steve_rowe Steve Rowe added a comment -

        My Jenkins found a reproducing branch_6x seed for a TestLongRangeFieldQueries.testBasics() failure:

           [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestLongRangeFieldQueries -Dtests.method=testBasics -Dtests.seed=470D5069FEB53A50 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=es-PE -Dtests.timezone=PST8PDT -Dtests.asserts=true -Dtests.file.encoding=UTF-8
           [junit4] FAILURE 0.01s J0 | TestLongRangeFieldQueries.testBasics <<<
           [junit4]    > Throwable #1: java.lang.AssertionError: expected:<4> but was:<5>
           [junit4]    > 	at __randomizedtesting.SeedInfo.seed([470D5069FEB53A50:7AD5FE45C65B6420]:0)
           [junit4]    > 	at org.apache.lucene.search.TestLongRangeFieldQueries.testBasics(TestLongRangeFieldQueries.java:135)
        [...]
           [junit4]   2> NOTE: test params are: codec=Asserting(Lucene62): {id=FSTOrd50}, docValues:{id=DocValuesFormat(name=Direct), longRangeField=DocValuesFormat(name=Lucene54)}, maxPointsInLeafNode=1625, maxMBSortInHeap=5.649688217301301, sim=RandomSimilarity(queryNorm=false,coord=no): {}, locale=es-PE, timezone=PST8PDT
           [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=313754016,total=499646464
        

        This is due to this issue's addition of CROSSES query support - here's the source code line pointed to by the stack trace:

        TestLongRangeFieldQueries.java
        135:    assertEquals(4, searcher.count(LongRangeField.newCrossesQuery(FIELD_NAME,
        136:        new long[] {-11, -15}, new long[] {15, 20})));
        
        Show
        steve_rowe Steve Rowe added a comment - My Jenkins found a reproducing branch_6x seed for a TestLongRangeFieldQueries.testBasics() failure: [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestLongRangeFieldQueries -Dtests.method=testBasics -Dtests.seed=470D5069FEB53A50 -Dtests.multiplier=2 -Dtests.nightly=true -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=es-PE -Dtests.timezone=PST8PDT -Dtests.asserts=true -Dtests.file.encoding=UTF-8 [junit4] FAILURE 0.01s J0 | TestLongRangeFieldQueries.testBasics <<< [junit4] > Throwable #1: java.lang.AssertionError: expected:<4> but was:<5> [junit4] > at __randomizedtesting.SeedInfo.seed([470D5069FEB53A50:7AD5FE45C65B6420]:0) [junit4] > at org.apache.lucene.search.TestLongRangeFieldQueries.testBasics(TestLongRangeFieldQueries.java:135) [...] [junit4] 2> NOTE: test params are: codec=Asserting(Lucene62): {id=FSTOrd50}, docValues:{id=DocValuesFormat(name=Direct), longRangeField=DocValuesFormat(name=Lucene54)}, maxPointsInLeafNode=1625, maxMBSortInHeap=5.649688217301301, sim=RandomSimilarity(queryNorm=false,coord=no): {}, locale=es-PE, timezone=PST8PDT [junit4] 2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=313754016,total=499646464 This is due to this issue's addition of CROSSES query support - here's the source code line pointed to by the stack trace: TestLongRangeFieldQueries.java 135: assertEquals(4, searcher.count(LongRangeField.newCrossesQuery(FIELD_NAME, 136: new long [] {-11, -15}, new long [] {15, 20})));

          People

          • Assignee:
            nknize Nicholas Knize
            Reporter:
            nknize Nicholas Knize
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development