[ 
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, some progress (new patch).

I created a silly method to find a "good" double value for "quantizing to int" 
purposes:

{noformat}
  /** Returns a double value >= x such that if you multiply that value by an 
int, and then
   *  divide it by that int again, you get precisely the same value back */
{noformat}

If we use such a value, then the encode/decode is stable.  E.g. for WGS84, the 
{{planetMax}} is 1.0011188539924791, and the nextSafeDouble after that value is 
1.0011191368103027.

But there is still one problem that I'm trying to work out, which is that if 
you encode the min value ({{-planetMax}}), and then decode that, you get back a 
value LESS than {{-planetMax}}, because of the flooring we do, and it's not 
guaranteed the planetMax would "be" at a floor boundary.  Somehow, magically, 
{{LatLonPoint}}'s min values seem to work ;)

Other tests are passing, except with this patch I hit this failure on beasting:

{noformat}
   [junit4] Started J0 PID(5288@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.05s | TestGeo3DPoint.testRandomBig <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: FAIL: id=541300 should 
have matched but did not
   [junit4]    >   shape=GeoStandardPath: {planetmodel=PlanetModel.WGS84, 
width=0.3665191429188092(21.0), points={[[lat=-0.9764909432864418, 
lon=1.5923866750547349], [lat=-0.044905310521497856, lon=0.543041341355748], 
[lat=-1.50783500438853, lon=-0.8877147957518042]]}}
   [junit4]    >   point=[X=0.8653002868649471, Y=0.50134342478497, 
Z=0.046203414829601996]
   [junit4]    >   docID=539356 deleted?=false
   [junit4]    >   query=PointInGeo3DShapeQuery: field=point: Shape: 
GeoStandardPath: {planetmodel=PlanetModel.WGS84, 
width=0.3665191429188092(21.0), points={[[lat=-0.9764909432864418, 
lon=1.5923866750547349], [lat=-0.044905310521497856, lon=0.543041341355748], 
[lat=-1.50783500438853, lon=-0.8877147957518042]]}}
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([3AD1F04EDC75F5CC:BD868DC14D2C894C]:0)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.verify(TestGeo3DPoint.java:730)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.doTestRandom(TestGeo3DPoint.java:530)
   [junit4]    >        at 
org.apache.lucene.spatial3d.TestGeo3DPoint.testRandomBig(TestGeo3DPoint.java:462)
   [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-001
   [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=407941736,total=492306432
   [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DPoint]
   [junit4] Completed [1/1 (1!)] in 5.23s, 1 test, 1 failure <<< FAILURES!
{noformat}

I haven't dug into it yet ...

> 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
>
>
> 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