Re: BooleanQuery: BooleanClause.Occur.MUST_NOT seems to require at least one BooleanClause.Occur.MUST

2020-11-06 Thread Adrien Grand
Hi Nissim, This is by design: boolean queries that don't have positive clauses like empty boolean queries or boolean queries that only consist of negative (MUST_NOT) clauses don't match any hits. On Thu, Nov 5, 2020 at 9:07 PM Nissim Shiman wrote: > Hello Apache Lucene team members, > I have

Re: BooleanQuery: BooleanClause.Occur.MUST_NOT seems to require at least one BooleanClause.Occur.MUST

2020-11-06 Thread Erick Erickson
Nissim: Here’s a good explanation of why it was designed this way if you’d like details: https://lucidworks.com/post/why-not-and-or-and-not/ Don’t be put off by the Solr title, it’s really about BooleanQuery and BooleanClause Best, Erick > On Nov 6, 2020, at 8:17 AM, Adrien Grand wrote: > >

Re: BooleanQuery: BooleanClause.Occur.MUST_NOT seems to require at least one BooleanClause.Occur.MUST

2020-11-06 Thread Nissim Shiman
Thank You Erick and Adrien! On Friday, November 6, 2020, 08:43:59 AM EST, Erick Erickson wrote: Nissim: Here’s a good explanation of why it was designed this way if you’d like details: https://lucidworks.com/post/why-not-and-or-and-not/ Don’t be put off by the Solr title, it’s

Re: BooleanQuery: BooleanClause.Occur.MUST_NOT seems to require at least one BooleanClause.Occur.MUST

2020-11-06 Thread Uwe Schindler
Hi, Finally, to "fix" it so it behaves like you may want it: just add a MatchAllDocsQuery as MUST or SHOULD clause. You have full control on how it behaves! Uwe Am November 6, 2020 6:05:03 PM UTC schrieb Nissim Shiman : > Thank You Erick and Adrien! >On Friday, November 6, 2020, 08:43:59 AM