convert error : nend convert select sql fields to json fields like `"_source":["title", "price"]`
gudigudi opened this issue · 2 comments
gudigudi commented
original SQL :
select title, price from products where title = '%A%'
expect like that :
{
"_source": [
"title",
"price",
],
"query": {
"bool": {
"must": [
{
"match_phrase": {
"title": {
"query": "%A%"
}
}
}
]
}
},
"from": 0,
"size": 1
}
actually, elasticsql.Convert(sql) didn't generate "_source":["title", "price"]
gudigudi commented
sql支持只select特定字段,es的查询也支持。实际使用中有这类需求的。