title: Is it possible to iterate through documents stored in Lucene Index?
body: <p>I have some documents stored in a Lucene index with a docId field.
  I want to get all docIds stored in the index. There is also a problem. Number of documents is about 300 000 so I would prefer to get this docIds in chunks of size 500. Is it possible to do so?</p>