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

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

Thanks [~nknize], patch looks great, but I'm seeing test failures, e.g:

{noformat}
   [junit4] Suite: org.apache.lucene.search.TestGeoPointQuery
   [junit4]   1> T1: id=0 docID=0 lat=0.0 lon=0.0 deleted?=false expected=true 
but got false query=GeoPointDistanceRangeQuery: field=geoField: Center: 
[0.0,0.0] Distance: 290419.347234561 m Lower Left: 
[-2.6088813842482064,-2.626445466260717] Upper Right: 
[2.6088813842482064,2.626445466260717]
   [junit4]   1> T0: id=0 docID=0 lat=0.0 lon=0.0 deleted?=false expected=true 
but got false query=GeoPointDistanceRangeQuery: field=geoField: Center: 
[0.0,0.0] Distance: 290419.347234561 m Lower Left: 
[-2.6088813842482064,-2.626445466260717] Upper Right: 
[2.6088813842482064,2.626445466260717]
   [junit4]   2> Spa 16, 2015 1:08:38 PM 
com.carrotsearch.randomizedtesting.RandomizedRunner$QueueUncaughtExceptionsHandler
 uncaughtException
   [junit4]   2> WARNING: Uncaught exception in thread: 
Thread[T0,5,TGRP-TestGeoPointQuery]
   [junit4]   2> java.lang.AssertionError: wrong hit
   [junit4]   2>        at 
__randomizedtesting.SeedInfo.seed([7080C492088EC9F3]:0)
   [junit4]   2>        at org.junit.Assert.fail(Assert.java:93)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$VerifyHits.test(TestGeoPointQuery.java:582)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$1._run(TestGeoPointQuery.java:523)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$1.run(TestGeoPointQuery.java:408)
   [junit4]   2> 
   [junit4]   2> Spa 16, 2015 1:08:38 PM 
com.carrotsearch.randomizedtesting.RandomizedRunner$QueueUncaughtExceptionsHandler
 uncaughtException
   [junit4]   2> WARNING: Uncaught exception in thread: 
Thread[T1,5,TGRP-TestGeoPointQuery]
   [junit4]   2> java.lang.AssertionError: wrong hit
   [junit4]   2>        at 
__randomizedtesting.SeedInfo.seed([7080C492088EC9F3]:0)
   [junit4]   2>        at org.junit.Assert.fail(Assert.java:93)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$VerifyHits.test(TestGeoPointQuery.java:582)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$1._run(TestGeoPointQuery.java:523)
   [junit4]   2>        at 
org.apache.lucene.search.TestGeoPointQuery$1.run(TestGeoPointQuery.java:408)
   [junit4]   2> 
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGeoPointQuery 
-Dtests.method=testRandom -Dtests.seed=7080C492088EC9F3 -Dtests.locale=lt_LT 
-Dtests.timezone=AST -Dtests.asserts=true -Dtests.file.encoding=UTF-8
{noformat}

Also, I realized (after struggling with it on LUCENE-6780) I was wrong about 
rewriting to {{MatchAllDocsQuery}}: this is not safe, because in general some 
docs won't have the geo field and we will then incorrectly match them.  So I 
think you should go back to the whole world bbox query?  (Maybe this explains 
the test failures?).

> 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, 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to