boolean isReadDouble, BitDocSet baseAdvanceDocs)
throws IOException, CloneNotSupportedException {
long l0=System.currentTimeMillis();
boolean isreadText=isinit&&(!isReadDouble);
DocValuesReader docValues = (DocValuesReader) quicktisInput.clone();
docValues.seekTo(fieldNumber,isreadText );
int doc = -1;
int tm = 0;
long l1=System.currentTimeMillis();
if (inv.fieldDataType == FieldDatatype.d_double) {
if (baseAdvanceDocs != null) {
DocIterator iter = baseAdvanceDocs.iterator();
while (iter.hasNext()) {
doc = iter.nextDoc();
tm = docValues.readTm(doc);
inv.markDocTm(doc, tm, isinit);
inv.bits.add(doc);
if (isReadDouble) {
inv.setTmValueDouble(tm,RamTermNumValue.EMPTY_FOR_MARK);
}
}
} else {
for (doc = 0; doc < maxdoc; doc++) {
tm = docValues.readTm(doc);
inv.markDocTm(doc, tm, isinit);
inv.bits.add(doc);
if (isReadDouble) {
inv.setTmValueDouble(tm,RamTermNumValue.EMPTY_FOR_MARK);
}
}
}
} else {
if (baseAdvanceDocs != null) {
DocIterator iter = baseAdvanceDocs.iterator();
while (iter.hasNext()) {
doc = iter.nextDoc();
tm = docValues.readTm(doc);
inv.markDocTm(doc, tm, isinit);
inv.bits.add(doc);
if (isReadDouble) {
inv.setTmValueLong(tm, (long) RamTermNumValue.EMPTY_FOR_MARK);
}
}
} else {
for (doc = 0; doc < maxdoc; doc++) {
tm = docValues.readTm(doc);
inv.markDocTm(doc, tm, isinit);
inv.bits.add(doc);
if (isReadDouble) {
inv.setTmValueLong(tm, (long) RamTermNumValue.EMPTY_FOR_MARK);
}
}
}
}
long l2=System.currentTimeMillis();
if (isReadDouble) {
if (inv.fieldDataType == FieldDatatype.d_double) {
BlockArray<Double> list = inv.getTmValueDouble();
for (int i = 0; i <=docValues.maxtm; i++) {
if (list.get(i) <= RamTermNumValue.EMPTY_FOR_MARK_FORCMP) {
double val = Double.longBitsToDouble(docValues.readTmValue(i,true));
list.set(i, val);
}
}
} else {
BlockArray<Long> list = inv.getTmValueLong();
for (int i = 0; i <=docValues.maxtm; i++) {
if (list.get(i) <= RamTermNumValue.EMPTY_FOR_MARK_FORCMP) {
long val = docValues.readTmValue(i,false);
list.set(i, val);
}
}
}