lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Ernst (JIRA)" <>
Subject [jira] [Updated] (LUCENE-7147) Improve disjoint check for geo distance query traversal
Date Tue, 29 Mar 2016 06:16:25 GMT


Ryan Ernst updated LUCENE-7147:
    Attachment: LUCENE-7147.patch

Here is a patch which adds the following simple logic: if the rect of the subtree do not cross
over any axis of the bbox, and none of the corners of the rect are in the circle, then they
are disjoint. Note that while the meridian axis of bbox is simple (it is just the longitude
of the circle center), the latitude is a little more complicated. This is the latitude at
which the bbox longitudes intersect the circle, which is *not* the latitude of the circle
center (as it would be in normal 2D), except when the center is on the equator. The patch
provides a utility method to calculate this latitude for a given circle. It also has a randomized
test to check this disjoint logic in isolation, outside of the geo data structures, and a
nice utility for visualizing these circles and rects, along with the bbox and its axis' (thanks

> Improve disjoint check for geo distance query traversal
> -------------------------------------------------------
>                 Key: LUCENE-7147
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Ryan Ernst
>         Attachments: LUCENE-7147.patch
> When doing geo distance queries, it is important to avoid traversing subtrees which do
not contain any relevant points. We currently have checks which compare the bbox of the query
to the bounds of the subtree. However, it is possible for a subtree to overlap the bbox, but
still not intersect the query. This issue is to improve that check to avoid unnecessary traversals.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message