You can do something like that if we are talking on the same filter query name.

addFilterQuery(String.format("%s:(%s %s)", filterName, value1, value2));

-----Original Message-----
From: Szűcs Roland <>
Sent: Tuesday, March 24, 2020 11:35 AM
Subject: how to add multiple value for a filter query in Solrj

Hi All,

I use Solr 8.4.1 and the latest solrj client.
There is a field let's which can have 3 different values. If I use the admin 
UI, I write to the fq the following: filterName:"value1"
filterName:"value2" and it is working as expected.
If I use solrJ SolrQuery.addFilterQuery method and call it twice like:
I got no any document back.

Can somebody help me what syntax is appropriate with solrj to add filter 
queries one by one if there is one filter field but multiple values?



This electronic message may contain proprietary and confidential information of 
Verint Systems Inc., its affiliates and/or subsidiaries. The information is 
intended to be for the use of the individual(s) or entity(ies) named above. If 
you are not the intended recipient (or authorized to receive this e-mail for 
the intended recipient), you may not use, copy, disclose or distribute to 
anyone this message or any information contained in this message. If you have 
received this electronic message in error, please notify us by replying to this 

Reply via email to