assertEquals(null,index.getTerm(t1, revNum));
}
public void checkTwoInserts(long revNum) {
long doc0, doc1, doc2;
QueryNode s;
QueryNode allTerms = index.getRange(ArrayBytes.EMPTY_BYTES, null, null, false, false, revNum);
s = index.getTerm(t1, revNum);
assertTrue(s.next());
doc0 = s.doc();
assertFalse(s.next());
assertTrue(allTerms.skipTo(doc0));
assertEquals(0, allTerms.term().compareTo(t1));
assertEquals(NextStatus.NEXT_TERM, allTerms.nextTerm());
assertEquals(0, allTerms.term().compareTo(t2));
assertEquals(NextStatus.NEXT_TERM, allTerms.nextTerm());
assertEquals(0, allTerms.term().compareTo(t4));
assertEquals(NextStatus.NEXT_TERM, allTerms.nextTerm());
assertEquals(0, allTerms.term().compareTo(t5));
assertEquals(NextStatus.AT_END, allTerms.nextTerm());
s = index.getTerm(t1, revNum);
doc1 = s.doc();
assertTrue(s.next());
doc2 = s.doc();
assertFalse(s.next());
assertTrue(doc1 < doc2);
allTerms = index.getRange(ArrayBytes.EMPTY_BYTES, null, null, false, false, revNum);
assertTrue(allTerms.skipTo(doc1));
assertEquals(0, allTerms.term().compareTo(t1));
assertEquals(NextStatus.NEXT_TERM, allTerms.nextTerm());
assertEquals(0, allTerms.term().compareTo(t3));
assertEquals(NextStatus.NEXT_DOC, allTerms.nextTerm());
s = index.getRange(t0, t3, t4, true, true, revNum);
assertNull(s);
s = index.getRange(t0, t3, t4, true, false, revNum);
assertNotNull(s);