FindAll function in Lucene.net
I have two fields in my web page, BookAuthor and BookDescription.On submit, the page searches on the lucene index using the given search criteria.
If the user doesn't enter anything in the two fields and doesn't submit the page, how do I make Lucene.Net return all the books from my index regardless of the BookAuthor and BookDescription field values?
Thank!
0
source to share
2 answers
the correct way to do it is to use MatchAllDocsQuery:
http://lucene.apache.org/java/2_9_4/api/core/org/apache/lucene/search/MatchAllDocsQuery.html
+3
source to share