lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pj...@apache.org
Subject svn commit: r769470 - in /lucene/java/trunk/contrib/spatial/src: java/org/apache/lucene/spatial/SerialChainFilter.java test/org/apache/lucene/spatial/tier/TestCartesian.java
Date Tue, 28 Apr 2009 17:14:09 GMT
Author: pjaol
Date: Tue Apr 28 17:14:09 2009
New Revision: 769470

URL: http://svn.apache.org/viewvc?rev=769470&view=rev
Log:
Fix class cast exception in SerialChainFilter

Modified:
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java
    lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java

Modified: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java?rev=769470&r1=769469&r2=769470&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java
Tue Apr 28 17:14:09 2009
@@ -125,7 +125,7 @@
           }
         break;
       case (AND):
-        bits.and(((DocIdBitSet)chain[i].getDocIdSet(reader)).getBitSet());
+        bits.and(chain[i].bits(reader));
         break;
       case (OR):
         bits.or(((DocIdBitSet)chain[i].getDocIdSet(reader)).getBitSet());

Modified: lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java?rev=769470&r1=769469&r2=769470&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java
Tue Apr 28 17:14:09 2009
@@ -157,7 +157,8 @@
     Query tq = new TermQuery(new Term("metafile", "doc"));
     
     FieldScoreQuery fsQuery = new FieldScoreQuery("geo_distance", Type.FLOAT);
-    CustomScoreQuery customScore = new CustomScoreQuery(tq,fsQuery){
+    
+    CustomScoreQuery customScore = new CustomScoreQuery(dq.getQuery(tq),fsQuery){
       
       @Override
       public float customScore(int doc, float subQueryScore, float valSrcScore){
@@ -184,7 +185,7 @@
     
     // Perform the search, using the term query, the serial chain filter, and the
     // distance sort
-    Hits hits = searcher.search(customScore, dq.getFilter(),sort);
+    Hits hits = searcher.search(customScore,null,sort);
 
     int results = hits.length();
     



Mime
View raw message