Hello Vishal.
It seems like it made a pure negative query which it can't work around.
A few notes:
 * +- syntax is more predictable than AND/OR
 * (perhaps) Json Query DSL even more predictable
 * it's always worth to check how query is parsed via debugQuery=true

I'd rather put this query as:
q=+*recordRetentionPolicyStatus:0* *-msg_content1:(ASI-STD-ITB*)
-(+status_id:1020 +project_id:2143947))*


On Mon, Jul 10, 2023 at 10:59 AM Vishal Patel <vishalpatel199...@outlook.com>
wrote:

>
>
> We are using Solr 8.9.0. We have configured Solr cloud like 2 shards and
> each shard has one replica. We have used 5 zoo keepers for Solr cloud.
>
> When we hit the query q= *(-msg_content1:(ASI-STD-ITB*) OR
> -(status_id:1020 AND project_id:2143947)) AND recordRetentionPolicyStatus:0*
> in Solr admin panel for one collection, we do not get the records but when
> we hit the query q= *(-msg_content1:(ASI-STD-ITB*) OR -(status_id:1020
> AND project_id:2143947)) * and fq= *recordRetentionPolicyStatus:0 *in
> Solr admin panel for one collection, we get the records. If we remove
> brackets like q= *-msg_content1:(ASI-STD-ITB*) OR -(status_id:1020 AND
> project_id:2143947) AND recordRetentionPolicyStatus:0 *then records are
> coming but not sure it is proper records come or not.
>
>
>
> Can you please help me what is issue here? Why is it not working if we add
> bracket?
>
>
>
> Regards,
>
> Vishal
>
>
>


-- 
Sincerely yours
Mikhail Khludnev

Reply via email to