Skip to content
Advertisement

Lucene: getting the full collection documents as results

When I perform a query in Lucene (topDocs = searcher.search(booleanQuery, 220000);) I get 170 hits as retrieved doc. Which is correct but I would like to have the full list of docs in the results even if the scores are very low.

Is there a way to force lucene to get the full list of documents of all my collection and not just the relevant ones ?

Or maybe it means that all other docs score is 0 ?

thanks

Advertisement

Answer

It should work if you search for ‘*’ and allow leading * in wildcard queries.
Just did a test in Luke on a 501 document index, which returns 501 results for this query.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement