testRange(2);
}
@Test
public void testInverseRange() throws Exception {
AtomicReaderContext context = SlowCompositeReaderWrapper.wrap(searcher.getIndexReader()).getContext();
NumericRangeFilter<Long> f = NumericRangeFilter.newLongRange("field8", 8, 1000L, -1000L, true, true);
assertNull("A inverse range should return the null instance",
f.getDocIdSet(context, context.reader().getLiveDocs()));
f = NumericRangeFilter.newLongRange("field8", 8, Long.MAX_VALUE, null, false, false);
assertNull("A exclusive range starting with Long.MAX_VALUE should return the null instance",
f.getDocIdSet(context, context.reader().getLiveDocs()));
f = NumericRangeFilter.newLongRange("field8", 8, null, Long.MIN_VALUE, false, false);
assertNull("A exclusive range ending with Long.MIN_VALUE should return the null instance",
f.getDocIdSet(context, context.reader().getLiveDocs()));
}