I'm using the following code because I want to see the entire collection in my query results:
//adding wildcards-term to see all results rest = new TermQuery(new Term("*","*")); booleanQuery.add(rest, BooleanClause.Occur.SHOULD); But it doesn't work, I only see the relevant docs and not all the other ones. How can I get all documents ordered by relevance instead ? ps. MatchAllDocsQuery is not a solution because I need to specify my own custom query.