assertFalse( intervalIterator.hasNext() );
assertFalse( documentIterator.hasNext() );
}
public void testQuery() throws IOException, QueryBuilderVisitorException {
Query query = new Consecutive( new Term( "a" ), new Remap( new Select( "index1", new Term( "b" ) ), new CharSequence[] { "index1" }, new CharSequence[] { "index0" } ) );
DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( indexMap, index0, Integer.MAX_VALUE );
DocumentIterator documentIterator = query.accept( documentIteratorBuilderVisitor );
assertTrue( documentIterator.hasNext() );
assertEquals( 0, documentIterator.nextDocument() );
IntervalIterator intervalIterator = documentIterator.intervalIterator( index0 );
assertEquals( it.unimi.dsi.util.Interval.valueOf( 0, 1 ), intervalIterator.nextInterval() );
assertFalse( intervalIterator.hasNext() );