[ 
https://issues.apache.org/jira/browse/LUCENE-7168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-7168:
---------------------------------------
    Attachment: LUCENE-7168.patch

OK, another patch, addressing all nocommits.  I think it's nearly
ready... I had to an "if" to decode to never go below {{-planetMax}}.

However the above failure still happens ...

So I've improved this test so that on failure, it runs a crazy (test
only) {{IntersectVisitor}} that "explains" what happened to this one
hit.  For this failure, it now produces output like this:

{noformat}
   [junit4] Started J0 PID(11250@localhost).
   [junit4] Suite: org.apache.lucene.spatial3d.TestGeo3DPoint
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeo3DPoint 
-Dtests.method=testRandomBig -Dtests.seed=3AD1F04EDC75F5CC -Dtests.nightly=true 
-Dtests.slow=true 
-Dtests.linedocsfile=lucenedata/hudson.enwiki.random.lines.txt.fixed 
-Dtests.locale=ru-RU -Dtests.timezone=America/Grand_Turk -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   [junit4] FAILURE 5.47s | TestGeo3DPoint.testRandomBig <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: FAIL: id=541300 should 
have matched but did not
   [junit4]    >   shape=GeoStandardCircle: {planetmodel=PlanetModel.WGS84, 
center=[lat=-0.8971654677124566, lon=-0.3398482030102755], 
radius=1.4775317506492547(84.65633340877824)}
   [junit4]    >   point=[X=0.8653002868649471, Y=0.50134342478497, 
Z=0.046203414829601996]
   [junit4]    >   docID=538760 deleted?=false
   [junit4]    >   query=PointInGeo3DShapeQuery: field=point: Shape: 
GeoStandardCircle: {planetmodel=PlanetModel.WGS84, 
center=[lat=-0.8971654677124566, lon=-0.3398482030102755], 
radius=1.4775317506492547(84.65633340877824)}
   [junit4]    >   explanation:
   [junit4]    >     target is in leaf _2u(7.0.0):c1 of full reader 
StandardDirectoryReader(segments:210:nrt _12(7.0.0):c198337/1995:delGen=1 
_24(7.0.0):c199685/601:delGen=1 _23(7.0.0):c5413/17:delGen=2 
_25(7.0.0):c5413/12:delGen=1 _26(7.0.0):c5413/10:delGen=1 
_27(7.0.0):c5413/10:delGen=1 _28(7.0.0):c5413/17:delGen=2 
_29(7.0.0):c5413/8:delGen=2 _2a(7.0.0):c5413/12:delGen=1 
_2b(7.0.0):c5413/14:delGen=1 _2c(7.0.0):c5413/4:delGen=1 
_2d(7.0.0):c5413/13:delGen=2 _2e(7.0.0):c5413/12:delGen=2 
_2f(7.0.0):c5413/15:delGen=2 _2g(7.0.0):c5413/10:delGen=2 
_2h(7.0.0):c5413/9:delGen=2 _2i(7.0.0):c5413/6:delGen=1 
_2j(7.0.0):c5413/9:delGen=1 _2k(7.0.0):c5413/8:delGen=1 
_2l(7.0.0):c5413/5:delGen=1 _2m(7.0.0):c5413/3:delGen=1 
_2n(7.0.0):c5413/4:delGen=1 _2o(7.0.0):c5413 _2p(7.0.0):c5413/5:delGen=1 
_2q(7.0.0):c5413/1:delGen=1 _2r(7.0.0):c5413 _2s(7.0.0):c5413 _2t(7.0.0):c5413 
_2u(7.0.0):c1)
   [junit4]    >     full BKD path to target doc:
   [junit4]    >       Cell(x=0.8653002866318559 TO 0.8653002870980383 
y=0.5013434245518787 TO 0.5013434250180612 z=0.04620341459651078 TO 
0.04620341506269321)
   [junit4]    >     on cell Cell(x=0.8653002866318559 TO 0.8653002870980383 
y=0.5013434245518787 TO 0.5013434250180612 z=0.04620341459651078 TO 
0.04620341506269321), wrapped visitor returned CELL_OUTSIDE_QUERY
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([3AD1F04EDC75F5CC:BD868DC14D2C894C]:0)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.verify(TestGeo3DPoint.java:741)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.doTestRandom(TestGeo3DPoint.java:537)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.testRandomBig(TestGeo3DPoint.java:469)
   [junit4]    >        at java.lang.Thread.run(Thread.java:745)
   [junit4]   2> NOTE: leaving temporary files on disk at: 
/l/geo3dquant/lucene/build/spatial3d/test/J0/temp/lucene.spatial3d.TestGeo3DPoint_3AD1F04EDC75F5CC-026
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene60): 
{id=TestBloomFilteredLucenePostings(BloomFilteringPostingsFormat(Lucene50(blocksize=128)))},
 docValues:{id=DocValuesFormat(name=Asserting)}, maxPointsInLeafNode=357, 
maxMBSortInHeap=5.860921451607786, sim=ClassicSimilarity, locale=ru-RU, 
timezone=America/Grand_Turk
   [junit4]   2> NOTE: Linux 3.13.0-71-generic amd64/Oracle Corporation 
1.8.0_60 (64-bit)/cpus=8,threads=1,free=410208728,total=495452160
   [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DPoint]
   [junit4] Completed [1/1 (1!)] in 5.63s, 1 test, 1 failure <<< FAILURES!
{noformat}

See the new "explanation" part.  Anyway, I was then able to turn those
BKD traversal details into a standalone test, that does fail:

{noformat}
  public void testCuriousFailure() throws Exception {
    GeoShape shape = GeoCircleFactory.makeGeoCircle(PlanetModel.WGS84, 
-0.8971654677124566, -0.3398482030102755, 1.4775317506492547);
    GeoPoint point = new GeoPoint(0.8653002868649471, 0.50134342478497, 
0.046203414829601996);

    // point is inside our circle shape:
    assertTrue(shape.isWithin(point));

    double xMin = 0.8653002866318559;
    double xMax = 0.8653002870980383;
    double yMin = 0.5013434245518787;
    double yMax = 0.5013434250180612;
    double zMin = 0.04620341459651078;
    double zMax = 0.04620341506269321;
    GeoArea xyzSolid = GeoAreaFactory.makeGeoArea(PlanetModel.WGS84, xMin, 
xMax, yMin, yMax, zMin, zMax);

    // point is also inside our wee tiny box:
    assertTrue(xyzSolid.isWithin(point));

    assertTrue(xyzSolid.getRelationship(shape) != GeoArea.DISJOINT);
  }
{noformat}

It's an interesting failure ... the segment has only one document, so
the BKD tree has a single leaf block with just that one value, and so
its bbox is really really tiny.  Maybe the tiny bbox and the gigantic
circle tickle a geo3d bug?


> Remove geo3d test leniency
> --------------------------
>
>                 Key: LUCENE-7168
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7168
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>         Attachments: LUCENE-7168.patch, LUCENE-7168.patch, LUCENE-7168.patch, 
> LUCENE-7168.patch, LUCENE-7168.patch
>
>
> Today the test hides possible failures by leniently handling quantization 
> issues.
> We should fix it to do what geo2d tests now do: pre-quantized indexed points, 
> but don't quantize query shapes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to