diff --git a/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java b/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java index c3c22f86255..f01f9b252d3 100644 --- a/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java +++ b/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java @@ -108,10 +108,7 @@ public class BooleanFilter extends Filter if (res !=null) return finalResult(res, reader.maxDoc()); - if (emptyDocIdSet == null) - emptyDocIdSet = new OpenBitSetDISI(1); - - return emptyDocIdSet; + return DocIdSet.EMPTY_DOCIDSET; } // TODO: in 3.0, instead of removing this deprecated @@ -126,8 +123,6 @@ public class BooleanFilter extends Filter : (DocIdSet) result; } - private static DocIdSet emptyDocIdSet = null; - /** * Adds a new FilterClause to the Boolean Filter container * @param filterClause A FilterClause object containing a Filter and an Occur parameter