I have created a lucene index .
I would like to get all documents that just according to a field sorting and no search terms!
Please specify q=*:*
as a search term
The class MatchAllDocsQuery
looks like what you need to retrieve all documents: https://lucene.apache.org/core/4_4_0/core/org/apache/lucene/search/MatchAllDocsQuery.html
I don't know your Lucene versions match but the answer at 1 may work for you. See 2 for another thread including another approach.
Is it possible to iterate through documents stored in Lucene Index?
http://lucene.472066.n3.nabble.com/Iterating-over-all-documents-in-an-index-td2480114.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With