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

Michael McCandless commented on LUCENE-6778:
--------------------------------------------

This looks nice [~nknize]!  I like how simple the query is, just rewriting to a 
BQ that excludes the {{minRadius}} distance points.

When the {{radius}} is too big, instead of doing the "whole world bbox query", 
couldn't we just do a {{MatchAllDocsQuery}}?  Should be the same thing but 
faster?

I know BQ effectively rewrites correctly, but instead of 
{{BooleanClause.Occur.SHOULD}} can you use {{MUST}}, for the outer radius 
query?  It just makes it clear that we have a {{MUST}} and a {{MUST_NOT}} 
clause.

In the randomized test, instead of using the bbox to derive a radius, why not 
just make a random radius to begin with (this is pre-existing)?

Can you please make this a an if statement instead?

{noformat}
+                query = (rangeQuery) ? new 
GeoPointDistanceRangeQuery(FIELD_NAME, centerLon, centerLat, radius, radiusMax) 
:
+                    new GeoPointDistanceQuery(FIELD_NAME, centerLon, 
centerLat, radius);
{noformat}

Thanks.

> Add GeoPointDistanceRangeQuery support for GeoPointField types
> --------------------------------------------------------------
>
>                 Key: LUCENE-6778
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6778
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Nicholas Knize
>         Attachments: LUCENE-6778.patch
>
>
> GeoPointDistanceQuery currently handles a single point distance. This 
> improvement adds a GeoPointDistanceRangeQuery for supporting use cases such 
> as: find all points between 10km and 20km of a known location. 



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