Inner purely negative queries match nothing. A query is about matching, and
skipping over things that don’t match. The fix is when using (-something) to
do (*:* -something) to match everything and skip the negative clause items.
In your example, try fq=((*:* -documentTypeId:3) AND companyId:29096)
Erik
> On Jun 13, 2017, at 3:15 AM, abhi Abhishek <[email protected]> wrote:
>
> Hi Everyone,
>
> I have hit a weird behavior of Boolean Query, when I am
> running the query with below param’s it’s not behaving as expected. can
> you please help me understand the behavior here?
>
>
>
> q=*:*&fq=((-documentTypeId:3)+AND+companyId:29096)&version=2.2&start=0&rows=10&indent=on&debugQuery=true
>
> èReturns 0 matches
>
> filter_queries: ((-documentTypeId:3) AND companyId:29096)
>
> parsed_filter_queries: +(-documentTypeId:3) +companyId:29096
>
>
>
> q=*:*&fq=(-documentTypeId:3+AND+companyId:29096)&version=2.2&start=0&rows=10&indent=on&debugQuery=true
>
> è returns 1600 matches
>
> filter_queries:(-documentTypeId:3 AND companyId:29096)
>
> parsed_filter_queries:-documentTypeId:3 +companyId:29096
>
>
>
> Can you please help me understand what am I missing here?
>
>
> Thanks in Advance.
>
>
> Thanks & Best Regards,
>
> Abhishek
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]