SQL-To-ElasticSearch
SQL-To-ElasticSearch copied to clipboard
'or' and 'and' operators work same
input select name from users where name='nick' and name='zxc'
output POST users/_search { "query": { "bool": { "must": [ { "match": { "name": "nick" } }, { "match": { "name": "zxc" } } ] } }, "_source": [ "name" ] }
input select name from users where name='nick' or name='zxc1'
output POST users/_search { "query": { "bool": { "must": [ { "match": { "name": "nick" } }, { "match": { "name": "zxc1" } } ] } }, "_source": [ "name" ] }