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

Michael McCandless commented on LUCENE-6699:
--------------------------------------------

I committed a basic test, but it fails in a fun way:

{noformat}
Time: 0.202
There was 1 failure:
1) testBasic(org.apache.lucene.bkdtree3d.TestGeo3DPointField)
java.lang.IllegalArgumentException: X values in wrong order or identical
        at 
__randomizedtesting.SeedInfo.seed([71BA4E421B49E771:DA405357C495615F]:0)
        at org.apache.lucene.geo3d.XYZSolid.<init>(XYZSolid.java:94)
        at 
org.apache.lucene.bkdtree3d.PointInGeo3DShapeQuery$1$1.compare(PointInGeo3DShapeQuery.java:124)
        at 
org.apache.lucene.bkdtree3d.BKD3DTreeReader.intersect(BKD3DTreeReader.java:190)
        at 
org.apache.lucene.bkdtree3d.BKD3DTreeReader.intersect(BKD3DTreeReader.java:129)
        at 
org.apache.lucene.bkdtree3d.BKD3DTreeReader.intersect(BKD3DTreeReader.java:113)
        at 
org.apache.lucene.bkdtree3d.PointInGeo3DShapeQuery$1.scorer(PointInGeo3DShapeQuery.java:99)
        at org.apache.lucene.search.Weight.bulkScorer(Weight.java:135)
        at 
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:69)
        at 
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:69)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
        at 
org.apache.lucene.search.AssertingIndexSearcher.search(AssertingIndexSearcher.java:92)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:425)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:544)
        at 
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:402)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:413)
        at 
org.apache.lucene.bkdtree3d.TestGeo3DPointField.testBasic(TestGeo3DPointField.java:58)
{noformat}

I think the X values are in fact identical ... I indexed a single point into 
the BKD tree, and so minX == maxX and the recursion uses these global min/max 
when recursing ... I think I might just remove the global min/max and instead 
recurse from the full int space.  This was a change I had "tried" vs the 2D BKD 
tree and I think I don't like it :)

> Integrate lat/lon BKD and spatial3d
> -----------------------------------
>
>                 Key: LUCENE-6699
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6699
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>         Attachments: Geo3DPacking.java, LUCENE-6699.patch, LUCENE-6699.patch, 
> LUCENE-6699.patch, LUCENE-6699.patch
>
>
> I'm opening this for discussion, because I'm not yet sure how to do
> this integration, because of my ignorance about spatial in general and
> spatial3d in particular :)
> Our BKD tree impl is very fast at doing lat/lon shape intersection
> (bbox, polygon, soon distance: LUCENE-6698) against previously indexed
> points.
> I think to integrate with spatial3d, we would first need to record
> lat/lon/z into doc values.  Somewhere I saw discussion about how we
> could stuff all 3 into a single long value with acceptable precision
> loss?  Or, we could use BinaryDocValues?  We need all 3 dims available
> to do the fast per-hit query time filtering.
> But, second: what do we index into the BKD tree?  Can we "just" index
> earth surface lat/lon, and then at query time is spatial3d able to
> give me an enclosing "surface lat/lon" bbox for a 3d shape?  Or
> ... must we index all 3 dimensions into the BKD tree (seems like this
> could be somewhat wasteful)?



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