mysql的where (a = 1 or b =2) and (c = 1 or d = 2) or (e = 1 and f =2)
翻译到ES的查询语句是怎样的
类似下面这种(我这个不正确!)
{
"query": {
"bool": {
"should": [
{ "match": { "a": 1 }},
{ "match": { "b": 1 }}
],
"should": [
{ "match": { "c": 1 }},
{ "match": { "d": 2 }}
]
}
翻译到ES的查询语句是怎样的
类似下面这种(我这个不正确!)
{
"query": {
"bool": {
"should": [
{ "match": { "a": 1 }},
{ "match": { "b": 1 }}
],
"should": [
{ "match": { "c": 1 }},
{ "match": { "d": 2 }}
]
}
1 个回复
Xargin
赞同来自: AlixMu
[url=https://github.com/NLPchina/elasticsearch-sql]https://github.com/NLPchina/elasticsearch-sql[/url]
和他们的demo站
http://www.nlpcn.org:9999/web/
或者用我写的小工具233
https://github.com/cch123/elasticsql