在 Mapping 里面,将 dynamic 参数设置成 strict 可以拒绝索引包含未知字段的文档。 此条 Tips 由 medcl 贡献。

[新手求教]关于elasticsearch的查询体系

Elasticsearch | 作者 ddyii | 发布于2018年08月15日 | 阅读数:1658

最近开始学着用elasticsearch,找资料也看文档,版本是6.3.2,但英语一般,英文文档半懂不懂,然后关于查询这一块就有很多疑问.问题如下:
为什么要分 query Api 与 ElasticSearch DSL 查询?
他们各自为了应对什么情景?
优劣是什么?
除了queryApi 和 Es Dsl还有其他的查询方式吗?
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

官网有解读:一个json串解决复杂的lucene查询。The query DSL is a flexible, expressive search language that Elasticsearch uses to expose most of the power of Lucene through a simple JSON interface. It is what you should be using to write your queries in production. It makes your queries more flexible, more precise, easier to read, and easier to debug.
https://www.elastic.co/guide/e ... .html

有的,6.3版本后支持sql检索

要回复问题请先登录注册