BytesRef upperBound = new BytesRef(LuceneUtil.createId(node.getDoc().getDocId(), node.getNodeId().nextSibling()));
if (termsEnum.seekCeil(lowerBound, false) != TermsEnum.SeekStatus.END) {
do {
BytesRef nextId = termsEnum.term();
if (nextId.compareTo(upperBound) < 0) {
docs = termsEnum.docs(null, docs, DocsEnum.FLAG_NONE);
while (docs.nextDoc() != DocIdSetIterator.NO_MORE_DOCS) {
int id = docs.docID();
result.set(id);
}