elasticsearch - elasticsearch7.1索引中的类型在哪里

标签 elasticsearch elasticsearch-1.6.0

我使用的是elasticsearch-1.6,这里有一个索引和一个类型,在该类型内我们有文档
https://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html
因为我们以twitter为索引,以tweet为类型,而1是文档ID
现在我需要升级到Elasticsearch当前版本是7.1,但是在文档中缺少该类型
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html

那么我如何在索引中定义类型呢?

最佳答案

据官方ES网站称,在ES 7.x版本中不推荐使用types

Indices created in Elasticsearch 7.0.0 or later no longer accept a default mapping. Indices created in 6.x will continue to function as before in Elasticsearch 6.x. Types are deprecated in APIs in 7.0, with breaking changes to the index creation, put mapping, get mapping, put template, get template and get field mappings APIs.



阅读更多关于此重大更改here的信息。

here解释了为什么将其删除。

但是它们提供了types的替代方法,其解释为here

让我知道您是否需要任何澄清。

关于elasticsearch - elasticsearch7.1索引中的类型在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56377009/

相关文章:

python - pip 安装不会向 pipFile 或 pipFile.lock 添加任何内容

elasticsearch - 大量删除的文档会影响查询速度吗?

java - Elasticsearch :found jar hell in test classpath

elasticsearch - ElasticsearchIllegalArgumentException

java - 如何使用嵌入式 ElasticSearch 进行集成测试

elasticsearch - 如何通过 Ansible 生成 Elasticsearch 安全用户

elasticsearch - 按嵌套数组的长度过滤

python - Windows上的Elasticsearch连接问题(found.io)

elasticsearch - Elasticsearch 如何按字母顺序按组值排序?

docker - elasticsearch-1.6 连接到其 docker 容器时无法初始化类 org.elasticsearch.monitor.jvm.JvmInfo