public int nextDoc() {while (true) {if (queue.size() == 0) {doc = NO_MORE_DOCS;break;}int newDoc = queue.top().docID();if (newDoc != doc) {assert newDoc > doc: "doc=" + doc + " newDoc=" + newDoc;doc = newDoc;break;}if (queue.top().nextDoc() == NO_MORE_DOCS) {queue.pop();} else {queue.updateTop();}}return doc;}
public override int NextDoc(){if (bitList != 0) {docID = (wordNum << 3) | ((bitList & 0x0F) - 1);bitList = (int)((uint)bitList >> 4);return docID;}NextWord();if (wordNum == int.MaxValue){return docID = NO_MORE_DOCS;}bitList = BitUtil.BitList(word);Debug.Assert(bitList != 0);docID = (wordNum << 3) | ((bitList & 0x0F) - 1);bitList = (int)((uint)bitList >> 4);return docID;}