bboss-elasticsearch icon indicating copy to clipboard operation
bboss-elasticsearch copied to clipboard

bboss ORM的limit问题、ik问题

Open syzbiaoren opened this issue 6 years ago • 1 comments

  1. limit 问题 select * from table limit from,size 这种语法是否有问题,一直报【逗号】不匹配 https://user-images.githubusercontent.com/55923514/98760184-b5e83180-240d-11eb-9bd0-5f6c3f4555e2.png 错误信息:{"error":{"root_cause":[{"type":"parsing_exception","reason":"line 1:68: mismatched input ',' expecting "}],"type":"parsing_exception","reason":"line 1:68: mismatched input ',' expecting ","caused_by":{"type":"input_mismatch_exception","reason":null}},"status":400}

2.ik_max_word问题 https://user-images.githubusercontent.com/55923514/98760414-2e4ef280-240e-11eb-9462-4c3ab359f3a7.png https://user-images.githubusercontent.com/55923514/98760461-4757a380-240e-11eb-873a-ef6555f11ab1.png 错误信息:{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[2:22] [sql/query] failed to parse object"}],"type":"x_content_parse_exception","reason":"[2:22] [sql/query] failed to parse object","caused_by":{"type":"json_parse_exception","reason":"Unexpected character ('é' (code 233)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@7830d98d; line: 2, column: 105]"}},"status":400} 请教下,这种sql写法是否有问题?参考案例是否有?

syzbiaoren avatar Nov 11 '20 03:11 syzbiaoren

Hi,@syzbiaoren

你的问题应该是elasticsearch不支持相应的sql语法,请用dsl替代解决方案,建议参考elasticsearch sql官方文档: https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html

bboss sql操作相关文档: https://esdoc.bbossgroups.com/#/Elasticsearch-SQL-ORM

yin-bp avatar Nov 11 '20 03:11 yin-bp