use scoreDocs array length as loop limit
 contains the total number of hits, which
can be larger than the length of the scoreDocs array