You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2015/10/19 23:11:54 UTC

svn commit: r1709478 - /lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java

Author: mikemccand
Date: Mon Oct 19 21:11:54 2015
New Revision: 1709478

URL: http://svn.apache.org/viewvc?rev=1709478&view=rev
Log:
LUCENE-6778: just use this.radius

Modified:
    lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java

Modified: lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java?rev=1709478&r1=1709477&r2=1709478&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java (original)
+++ lucene/dev/trunk/lucene/sandbox/src/java/org/apache/lucene/search/GeoPointDistanceRangeQuery.java Mon Oct 19 21:11:54 2015
@@ -45,15 +45,6 @@ public final class GeoPointDistanceRange
       return q;
     }
 
-    final double radius;
-    if (q instanceof BooleanQuery) {
-      final List<BooleanClause> clauses = ((BooleanQuery)q).clauses();
-      assert clauses.size() > 0;
-      radius = ((GeoPointDistanceQueryImpl)(clauses.get(0).getQuery())).getRadius();
-    } else {
-      radius = ((GeoPointDistanceQueryImpl)q).getRadius();
-    }
-
     // add an exclusion query
     BooleanQuery.Builder bqb = new BooleanQuery.Builder();