diff --git a/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java b/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java index 9cc6f92df36..7cf534c87d5 100644 --- a/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java +++ b/contrib/spatial/src/java/org/apache/lucene/spatial/SerialChainFilter.java @@ -125,7 +125,7 @@ public class SerialChainFilter extends Filter { } 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()); diff --git a/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java b/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java index d341e2e343e..16648b390d4 100644 --- a/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java +++ b/contrib/spatial/src/test/org/apache/lucene/spatial/tier/TestCartesian.java @@ -157,7 +157,8 @@ public class TestCartesian extends TestCase{ 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 @@ public class TestCartesian extends TestCase{ // 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();