lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r730653 - /lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
Date Fri, 02 Jan 2009 00:51:27 GMT
Author: ryan
Date: Thu Jan  1 16:51:26 2009
New Revision: 730653

URL: http://svn.apache.org/viewvc?rev=730653&view=rev
Log:
LUCENE-1387 -- expose getLat/getLng from DistanceQueryBuilder

Modified:
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java

Modified: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java?rev=730653&r1=730652&r2=730653&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceQueryBuilder.java
Thu Jan  1 16:51:26 2009
@@ -32,9 +32,9 @@
   public BoundaryBoxFilter lngFilter;
   public DistanceFilter distanceFilter;
   
-  private double lat;
-  private double lng;
-  private double miles;
+  private final double lat;
+  private final double lng;
+  private final double miles;
   private Filter cartesianFilter;
   
   /**
@@ -74,12 +74,9 @@
   * @param miles
   */
   public Filter getFilter() {
-    
-      return new SerialChainFilter(new Filter[] {cartesianFilter, distanceFilter},
+    return new SerialChainFilter(new Filter[] {cartesianFilter, distanceFilter},
                     new int[] {SerialChainFilter.AND,
                            SerialChainFilter.SERIALAND});
-
-   
   }
   
   public Filter getFilter(Query query) {
@@ -96,6 +93,18 @@
   public Query getQuery() {
       return new ConstantScoreQuery(getFilter());
   }
+
+  public double getLat() {
+    return lat;
+  }
+
+  public double getLng() {
+    return lng;
+  }
+
+  public double getMiles() {
+    return miles;
+  }
     
   @Override
   public String toString() {



Mime
View raw message