NumericDocValuesWriter
addValue
public void addValue(int docID, long value) {
pending.add(value);
docsWithField.add(docID);
updateBytesUsed();
lastDocID = docID;
}
将 docID 和 value 配对存到相应的数据结构。pending 和 docsWithField 可以简单看做是两个数组,分别存储 value 和 docID。
flush
Lucene90DocValuesConsumer
addNumericField
writeValues