开发者

Lucene Query clause to always return true?

Is there a Lucene clause to always return true? I am building my queries programmatically, and I believe it'll be useful if I can insert a clause which will always evaluate to true for any document. For example, I might be matching field foo against a list of values, and I want to say "if values is empty, then select all the documents". In SQL I can use "whe开发者_JAVA技巧re 1=1", is there anything like this in Lucene? Or am I barking up the wrong tree?


I think you are looking for MatchAllDocsQuery

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜