You should do the MultiDocValues.getBinaryDocValues(indexReader, "pos_id")
once up front, not per hit.
You could operate per-segment instead by making a custom Collector.
Are you sorting by your pos_id field? If so, the value is already
available in each FieldDoc and you don't need to separately
Hi Randy,
a first quick and easy win would be to rewrite it as:
DocumentStoredFieldVisitor visitor = new
DocumentStoredFieldVisitor(Collections.singleton("pos_id”));
for(int i=0; i wrote:
> My Lucene index has about 3 million documents and result sets can be large,
> often 1000’s and sometimes a