public class OrderedAndDocumentIteratorTest extends TestCase {
public void testSkipBug() throws QueryParserException, QueryBuilderVisitorException, IOException, ConfigurationException, SecurityException, URISyntaxException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
BitStreamIndex index;
SimpleParser simpleParser;
String basename = File.createTempFile( getClass().getSimpleName(), "test" ).getCanonicalPath();
new IndexBuilder( basename, new StringArrayDocumentCollection( "a a b c d e" ) ).run();
index = DiskBasedIndex.getInstance( basename + "-text", true, true );
simpleParser = new SimpleParser( index.termProcessor );
Query query = simpleParser.parse( "(a|b|d)<(a|b|d)" );
DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( null, index, Integer.MAX_VALUE );
DocumentIterator documentIterator = query.accept( documentIteratorBuilderVisitor );
documentIterator.nextDocument();
IntervalIterator intervalIterator = documentIterator.intervalIterator();
assertEquals( Interval.valueOf( 0, 1 ), intervalIterator.nextInterval() );