Open otary opened 3 years ago
如题,希望后续能支持UPDATE、DELETE等sql,最好建表SQL也能支持
Update, Delete 都有,create 目前没有,有时间我加下。
@otary,如果你愿意,欢迎提pr
试了下,UPDATE语句解析报错:[syntax error] indices name must be set
试了下,UPDATE语句解析报错:[syntax error] indices name must be set
发下语句
UPDATE users set age = 10 where id =1
实际上,任何UPDATE语句都会报错~!
UPDATE users set age = 10 where id =1
@otary 你是这么获取的吗?parseResult.getUpdateByQueryRequest()
ElasticSql2DslParser elasticSql2DslParser = new ElasticSql2DslParser(); ElasticSqlParseResult result = elasticSql2DslParser.parse("UPDATE users set age = 10 where id =1");
result.getUpdateByQueryRequest(); // 返回内容update-by-query [users] updated with Script{type=inline, lang='painless', idOrCode='ctx._source.age=10;', options={}, params={}} result.getSearchRequest(); // 报错:[syntax error] indices name must be set
我想获取update的dsl,不知道要怎么获取呢?求指教
如题,希望后续能支持UPDATE、DELETE等sql,最好建表SQL也能支持