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

Ignacio Vera commented on LUCENE-9641:
--------------------------------------

The rationale behind this change is to be able to perform the same queries into 
Lucene geo fields regardless if the data has been indexed with LatLonPoint or 
LatLonShape. There are currently some queries that cannot be execute easily, or 
just cannot be solved, with LatLonPoint but can be done with LatLonShape, 
therefore it makes it difficult to integrate those two fields together in geo 
applications.

One example of lack of functionality are spatial queries with WITHIN 
relationship. While for documents with a single point, this query is equivalent 
to intersects, when a document has more that one point associated, the query 
should return only the documents where *all* points are WITHIN the query 
geometry. This cannot be solved at the moment if data is indexed with 
LatLonPoint.

This change ensure as well consistence between those two fields: queries over 
the same set of points, indexed  using either LatLonShape or LatLonPoint should 
return the same results. LatLonPoint is just a specialise field for indexing 
LatLonShape data that consist only of points.

 

 

 

> Support for spatial relationships in LatLonPoint
> ------------------------------------------------
>
>                 Key: LUCENE-9641
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9641
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Ignacio Vera
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently LatLonPoint can only generate queries that compute the documents 
> that has at least one point intersecting a provided geometry.  LatLonShape on 
> the other hand supports different spatial relationships, namely CONTAINS, 
> WITHIN, DISJOINT and INTERSECTS.
> It would be good if LatLonPoint can work as well with different spatial 
> relationships.
> It should be possible to modify ShapeQuery to work in both Shape and Points 
> and therefore add the capability to compute spatial relationships for point 
> as well.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to