[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-08 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14734998#comment-14734998
 ] 

Michael McCandless commented on LUCENE-6776:


I've been beasting this last patch for ~6 hours ... no failures!  I think it's 
a keeper ... I'll commit soon.

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-08 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14735089#comment-14735089
 ] 

ASF subversion and git services commented on LUCENE-6776:
-

Commit 1701835 from [~mikemccand] in branch 'dev/trunk'
[ https://svn.apache.org/r1701835 ]

LUCENE-6776: Fix geo3d math to handle randomly squashed planets

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-08 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14735094#comment-14735094
 ] 

ASF subversion and git services commented on LUCENE-6776:
-

Commit 1701837 from [~mikemccand] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1701837 ]

LUCENE-6776: Fix geo3d math to handle randomly squashed planets

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-07 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14734033#comment-14734033
 ] 

Karl Wright commented on LUCENE-6776:
-

This is unrelated to the fixes done.
Basically, some shape somewhere is computing an edge point and finding that it 
can't do it, but trying to use it anyway.  Looks like it's a polygon.  It 
*should* throw IllegalArgumentException in that case, but doesn't.  I will code 
a fix and attach the whole patch to the ticket.


> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-07 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14734031#comment-14734031
 ] 

Michael McCandless commented on LUCENE-6776:


Thanks [~daddywri], this patch lasted for 6 hours of heavy (36 JVMs) beasting, 
then hit this:

{noformat}
[junit4:pickseed] Seed property 'tests.seed' already defined: C51A81D82CBA7AC0
   [junit4]  says hello! Master seed: C51A81D82CBA7AC0
   [junit4] Executing 1 suite with 1 JVM.
   [junit4] 
   [junit4] Started J0 PID(23324@localhost).
   [junit4] Suite: org.apache.lucene.bkdtree3d.TestGeo3DPointField
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeo3DPointField 
-Dtests.method=testGeo3DRelations -Dtests.seed=C51A81D82CBA7AC0 
-Dtests.multiplier=5 -Dtests.slow=true 
-Dtests.linedocsfile=/lucenedata/hudson.enwiki.random.lines.txt.fixed 
-Dtests.locale=ar_OM -Dtests.timezone=Pacific/Midway -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   [junit4] ERROR   1.17s | TestGeo3DPointField.testGeo3DRelations <<<
   [junit4]> Throwable #1: java.lang.NullPointerException
   [junit4]>at 
__randomizedtesting.SeedInfo.seed([C51A81D82CBA7AC0:7565FC4CA3F7D45C]:0)
   [junit4]>at 
org.apache.lucene.geo3d.GeoCompositeMembershipShape.isWithin(GeoCompositeMembershipShape.java:47)
   [junit4]>at 
org.apache.lucene.geo3d.BaseXYZSolid.isAreaInsideShape(BaseXYZSolid.java:131)
   [junit4]>at 
org.apache.lucene.geo3d.XYZSolid.getRelationship(XYZSolid.java:312)
   [junit4]>at 
org.apache.lucene.bkdtree3d.TestGeo3DPointField.testGeo3DRelations(TestGeo3DPointField.java:546)
   [junit4]>at java.lang.Thread.run(Thread.java:745)
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene53): {}, 
docValues:{}, sim=RandomSimilarityProvider(queryNorm=false,coord=no): {}, 
locale=ar_OM, timezone=Pacific/Midway
   [junit4]   2> NOTE: Linux 3.19.0-21-generic amd64/Oracle Corporation 
1.8.0_51 (64-bit)/cpus=72,threads=1,free=413503048,total=514850816
   [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DPointField]
   [junit4] Completed [1/1] in 1.48s, 1 test, 1 error <<< FAILURES!
{noformat}

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-06 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14732304#comment-14732304
 ] 

Michael McCandless commented on LUCENE-6776:


bq. FWIW, there's nothing special about SPHERE or WGS84. They're just 
predefined models with specific parameters.

Thanks, that makes sense ... I just wanted to bias the randomness to pick those 
two specific models more often since users will actually use those ones 
(presumably) most frequently ...

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-05 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731902#comment-14731902
 ] 

Michael McCandless commented on LUCENE-6776:


I see the {{FUDGE_FACTOR}} became small again, but I don't see that we are 
randomizing the {{PlanetModel}} in {{TestGeo3DPointField}} in the latest patch 
(it was in the first patch).

Should I fold that in from the first patch, for beasting?

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-05 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731922#comment-14731922
 ] 

Karl Wright commented on LUCENE-6776:
-

Sorry!  I meant to include the random planet model...

FWIW, there's nothing special about SPHERE or WGS84.  They're just predefined 
models with specific parameters. ;-)

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch, 
> LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-05 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731900#comment-14731900
 ] 

Michael McCandless commented on LUCENE-6776:


Thanks [~daddywri], I'll start beasting!

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730650#comment-14730650
 ] 

Karl Wright commented on LUCENE-6776:
-

After fixing one problem with the above math, I got the x bounds working well.  
Then I implemented y bounds, but unfortunately that code fails an assertion.  X 
and Y are perfectly symmetric with one another so I was able to verify the math 
exactly, so the problem must be implementation related.  Still digging...

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730747#comment-14730747
 ] 

Karl Wright commented on LUCENE-6776:
-

[~mikemccand]: It appears that GeoPath's occasionally have some trouble when 
the planet model gets more extreme than WGS84.  It will take some research to 
get to the bottom of that. Unfortunately I can't reproduce any of the failures 
that beasting finds!!  If there's any way to fix this I'd greatly appreciate 
it...

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730909#comment-14730909
 ] 

Michael McCandless commented on LUCENE-6776:


bq. Unfortunately I can't reproduce any of the failures that beasting finds!! 
If there's any way to fix this I'd greatly appreciate it...

Hmm that's very bad.

Maybe try dropping {{numThreads}} to 1 (and put a nocommit comment) and find a 
failing seed and then see if that fixes the "unable to repro"?

What exact command line are you using for beasting?  Maybe there is a bug in 
the "Reproduce with: XXX" logic.

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731036#comment-14731036
 ] 

Michael McCandless commented on LUCENE-6776:


bq. So I really do need repeatability here to make any progress.

Argh, we are simply hitting this long ago known issue: LUCENE-6194.

The workaround (I think?) is to simply add back the {{-Dtests.iters=10}} that 
you had originally specified to {{ant beast}}, but you also must add a wildcard 
* at the end of the {{-Dtests.name=XXX}}.  E.g. I just hit a failure with your 
{{ant beast}} line, confirmed the {{Reproduce with}} line is buggy (does not in 
fact reproduce) but then added back the iters and the {{*}} and it does 
reproduce:

{noformat}
ant test  -Dtestcase=TestGeo3DPointField -Dtests.method=testGeo3DRelations* 
-Dtests.seed=B8B6B22C45AFEE9F -Dtests.locale=ms_MY 
-Dtests.timezone=America/Moncton -Dtests.asserts=true 
-Dtests.file.encoding=US-ASCII -Dtests.iters=10
{noformat}

causes:

{noformat}
   [junit4] FAILURE 0.33s | TestGeo3DPointField.testGeo3DRelations {#7 
seed=[B8B6B22C45AFEE9F:7CCEE6732E8A91DE]} <<<
   [junit4]> Throwable #1: java.lang.AssertionError: invalid hits for 
shape=GeoPath: {planetmodel=PlanetModel(ab=1.151145876105594 
c=0.8488541238944061), width=0.008726646259971648(0.5), 
points={[[lat=-0.6925658899376476, lon=0.6316613927914589], 
[lat=0.27828548161836364, lon=0.6785795524104564]]}}
   [junit4]>at 
__randomizedtesting.SeedInfo.seed([B8B6B22C45AFEE9F:7CCEE6732E8A91DE]:0)
   [junit4]>at 
org.apache.lucene.bkdtree3d.TestGeo3DPointField.testGeo3DRelations(TestGeo3DPointField.java:708)
   [junit4]>at java.lang.Thread.run(Thread.java:745)
   [junit4] OK  1.64s | TestGeo3DPointField.testGeo3DRelations {#8 
seed=[B8B6B22C45AFEE9F:4E62031D59418684]}
   [junit4] OK  0.98s | TestGeo3DPointField.testGeo3DRelations {#9 
seed=[B8B6B22C45AFEE9F:99E955A73D16B1D6]}
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene53): {}, 
docValues:{}, sim=RandomSimilarityProvider(queryNorm=true,coord=crazy): {}, 
locale=ms_MY, timezone=America/Moncton
   [junit4]   2> NOTE: Linux 3.13.0-61-generic amd64/Oracle Corporation 
1.8.0_40 (64-bit)/cpus=8,threads=1,free=455977424,total=471859200
   [junit4]   2> NOTE: All tests run in this JVM: [TestGeo3DPointField]
   [junit4] Completed [1/1] in 7.14s, 10 tests, 1 failure <<< FAILURES!
{noformat}

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730937#comment-14730937
 ] 

Karl Wright commented on LUCENE-6776:
-

This is what I've been doing:

{code}
ant beast -Dbeast.iters=100 -Dtestcase=TestGeo3DPointField 
-Dtestmethod=testGeo3DRelations -Dtests.dups=6 -Dtests.iters=10 >capture 
2>capture2
{code}

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730949#comment-14730949
 ] 

Karl Wright commented on LUCENE-6776:
-

Tried dropping numThreads in verify() to 1.  Didn't help with reproducibility, 
unfortunately.


> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14730983#comment-14730983
 ] 

Karl Wright commented on LUCENE-6776:
-

These turn out to be another series of "the point should be a hit but isn't" 
failures.

I tried to reproduce it with the information I could print at the time of the 
actual failure, and checked whether the XYZBound that was computed was correct. 
 It was.  So I really *do* need repeatability here to make any progress.

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-04 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14731078#comment-14731078
 ] 

Karl Wright commented on LUCENE-6776:
-

Thanks-- was able to construct a simple test case that demonstrated the 
problem.  Now, back to debugging...


> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch, LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-03 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14728565#comment-14728565
 ] 

Karl Wright commented on LUCENE-6776:
-

The failure is, once again, a single point that is outside the XYZBounds 
computed for the shape.  Stay tuned for further analysis, probably later this 
morning.  Either there's a mathematical error, or the calculation itself is too 
problematic in its current form due to error bars.

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-03 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14728798#comment-14728798
 ] 

Karl Wright commented on LUCENE-6776:
-

The analysis: The Z bound is unaffected.  The X and Y bounds, however, are 
being computed improperly due to a wrong assumption I made when deriving the 
method for computing them. They work for spheres accurately, and they work with 
increasing inaccuracy for increasingly non-spherical ellipsoids.

The only fix is to derive an accurate formula for the min/max in X and in Y.  I 
believe this is doable, but I'll have to actually do it before I'm sure.  Due 
to other time constraints, this is not likely to be ready for at least a day.

Meanwhile, the value of FUDGE_FACTOR chosen is adequate for WGS84, but will not 
stand up to any planet model that is more oblate than that.  When a true fix is 
in place, FUDGE_FACTOR may be reducible to a very small value.

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-03 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14728840#comment-14728840
 ] 

Michael McCandless commented on LUCENE-6776:


Oh it sounds like good news that this means we can drop FUDGE_FACTOR back down! 
 Thanks for digging [~daddywri].

> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-6776) Randomized planet model shows up additional XYZBounds errors

2015-09-03 Thread Karl Wright (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-6776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14729991#comment-14729991
 ] 

Karl Wright commented on LUCENE-6776:
-

Ok, here's the math.  This is for the bounds in x.  I had to go with the full 
treatment using lagrange multipliers.  Haven't yet debugged it either, but 
clearly it's doable; you get a quadratic in a parameterization variable, which 
can then be applied to produce a pair of (x,y,z) values:

{code}
Another approach: Lagrange multipliers

For this, we need grad(F(x,y,z)) = (dF/dx, dF/dy, dF/dz).

Minimize and maximize f(x,y,z) = x, with respect to g(x,y,z) = Ax + By + Cz - D 
and h(x,y,z) = x^2/ab^2 + y^2/ab^2 + z^2/c^2 - 1

grad(f(x,y,z)) = (1,0,0)
grad(g(x,y,z)) = (A,B,C)
grad(h(x,y,z)) = (2x/ab^2,2y/ab^2,2z/c^2)

Equations we need to simultaneously solve:

grad(f(x,y,z)) = l * grad(g(x,y,z)) + m * grad(h(x,y,z))
g(x,y,z) = 0
h(x,y,z) = 0

Equations:
1 = l*A + m*2x/ab^2
0 = l*B + m*2y/ab^2
0 = l*C + m*2z/c^2
Ax + By + Cz + D = 0
x^2/ab^2 + y^2/ab^2 + z^2/c^2 - 1 = 0

Solve for x in terms of (l, m):

x = ((1 - l*A) * ab^2 ) / (2 * m)
y = (-l*B * ab^2) / ( 2 * m)
z = (-l*C * c^2)/ (2 * m)

Two equations, two unknowns:

A * (((1 - l*A) * ab^2 ) / (2 * m)) + B * ((-l*B * ab^2) / ( 2 * m)) + C * 
((-l*C * c^2)/ (2 * m)) + D = 0

and

(((1 - l*A) * ab^2 ) / (2 * m))^2/ab^2 + ((-l*B * ab^2) / ( 2 * m))^2/ab^2 + 
((-l*C * c^2)/ (2 * m))^2/c^2 - 1 = 0

Simple: solve for l and m, then find x from it.

(a) Use first equation to find l in terms of m.

A * (((1 - l*A) * ab^2 ) / (2 * m)) + B * ((-l*B * ab^2) / ( 2 * m)) + C * 
((-l*C * c^2)/ (2 * m)) + D = 0
A * ((1 - l*A) * ab^2 ) + B * (-l*B * ab^2) + C * (-l*C * c^2) + D * 2 * m = 0
A * ab^2 - l*A^2* ab^2 - B^2 * l * ab^2 - C^2 * l * c^2 + D * 2 * m = 0
- l *(A^2* ab^2 + B^2 * ab^2 + C^2 * c^2) + (A * ab^2 + D * 2 * m) = 0
l = (A * ab^2 + D * 2 * m) / (A^2* ab^2 + B^2 * ab^2 + C^2 * c^2)
l = m * 2 * (A * ab^2 + D) / (A^2* ab^2 + B^2 * ab^2 + C^2 * c^2)

For convenience:

k = (A^2* ab^2 + B^2 * ab^2 + C^2 * c^2) / (2 * (A * ab^2 + D))

Then:

m = l * k


(b) Simplify the second equation before substitution

(((1 - l*A) * ab^2 ) / (2 * m))^2/ab^2 + ((-l*B * ab^2) / ( 2 * m))^2/ab^2 + 
((-l*C * c^2)/ (2 * m))^2/c^2 - 1 = 0
((1 - l*A) * ab^2 )^2/ab^2 + (-l*B * ab^2)^2/ab^2 + (-l*C * c^2)^2/c^2 = 4 * m^2
(1 - l*A)^2 * ab^2 + (-l*B)^2 * ab^2 + (-l*C)^2 * c^2 = 4 * m^2
(1 - 2*l*A + l^2*A^2) * ab^2 + l^2*B^2 * ab^2 + l^2*C^2 * c^2 = 4 * m^2
ab^2 - 2*l*A*ab^2 + l^2*A^2*ab^2 + l^2*B^2*ab^2 + l^2*C^2*c^2 = 4 * l^2 * k^2

l^2 * (A^2*ab^2 + B^2*ab^2 + C^2*c^2 - 4 * k^2) - l * (2*A*ab^2) + ab^2 = 0

{code}

There will be similar code for the y min and max.

Stay tuned for debugging and eventually a patch.


> Randomized planet model shows up additional XYZBounds errors
> 
>
> Key: LUCENE-6776
> URL: https://issues.apache.org/jira/browse/LUCENE-6776
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: modules/spatial
>Reporter: Karl Wright
> Attachments: LUCENE-6776.patch
>
>
> Adding randomized PlanetModel construction causes points to be generated 
> inside a shape that are outside XYZBounds.  [~mikemccand] please take note.



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org