Search with multiple conditions

Hello,

I have a very simple problem that I would like to translate into an ES search.
I have different items with 2 fields : registration_label which is a string and is_optam is a bool.

My query in SQL would be something like :

SELECT * from practitioner where (registration_label = 'c1' and is_optam = 1) OR (registration_label = 'c1' and is_optam = 0) OR (registration_label = 'c2' and is_optam = 1) OR (registration_label = 'c2' and is_optam = 0) OR (registration_label = 'c3' and is_optam = 0) ;

How could i translate this into ES ?

Many thanks

Try this

https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.