diff --git a/src/main/java/org/elasticsearch/common/lucene/search/TermFilter.java b/src/main/java/org/elasticsearch/common/lucene/search/TermFilter.java index 9b0ef7e03ea..3f54cf13262 100644 --- a/src/main/java/org/elasticsearch/common/lucene/search/TermFilter.java +++ b/src/main/java/org/elasticsearch/common/lucene/search/TermFilter.java @@ -24,6 +24,8 @@ import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Filter; import org.apache.lucene.util.Bits; +import org.apache.lucene.util.Version; +import org.elasticsearch.common.lucene.Lucene; import java.io.IOException; @@ -32,6 +34,11 @@ import java.io.IOException; */ public class TermFilter extends Filter { + static { + // Remove this class and TermsFilterTests when upgrading to Lucene 4.5 + assert Lucene.VERSION == Version.LUCENE_44; + } + private final Term term; public TermFilter(Term term) {