Query Builder - Search multiple properties with AND/OR operator | Community
Skip to main content
Level 3
Aug 24, 2020 8:25 AM UTC
Solved

Query Builder - Search multiple properties with AND/OR operator

How can I search with in multiple properties using OR operator. Below is what I need:

 

path=/test/12

1_property=property1

1_property.value=value1

          AND

 

2_property=property2

2_property.value=value2

          OR

3_property=property3

3_property.value=value3

 

1st property is mandatory while 2nd and 3rd is OR

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Nupur_Jain
Nupur_JainAccepted solution
Employee
Aug 24, 2020 8:56 AM UTC

Hi @troubleshooter3 

 

Your Query builder query should look like this

 

 

path=/test/12 1_property=property1 1_property.value=value1 group.p.or=true group.2_property=property2 group.2_property.value=value2 group.3_property=property3 group.3_property.value=value3

 

 

if I am able to understand your requirment correctly. The above query should return path where property1 should be equal to value1 and either of the other two properties must be same as given value i.e property2=value2 or property3=value3.

 

Hope it helps!

Thanks!

Nupur

2 replies

Nupur_Jain
Nupur_JainAccepted solution
Employee
Aug 24, 2020 8:56 AM UTC

Hi @troubleshooter3 

 

Your Query builder query should look like this

 

 

path=/test/12 1_property=property1 1_property.value=value1 group.p.or=true group.2_property=property2 group.2_property.value=value2 group.3_property=property3 group.3_property.value=value3

 

 

if I am able to understand your requirment correctly. The above query should return path where property1 should be equal to value1 and either of the other two properties must be same as given value i.e property2=value2 or property3=value3.

 

Hope it helps!

Thanks!

Nupur

Translate
Level 3
Aug 24, 2020 4:38 PM UTC
Thanks! Thats what I was looking for.
Translate