Something here doesn't add up - you want to iterate through all the documents in an index, but you can't use the most obvious method because it's too slow? What makes you think this operation can be performed in a way that won't be slow? Data structures in general tend to be optimized for either random-access (think hashes) or iteration (think arrays). I bet KinoSearch is more like the former than the latter!