elasticsearch - 排序时,Elasticsearch 5会做什么?

标签 elasticsearch

我读了下面关于Elasticsearch文档的文字。

https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-request-sort.html#_memory_considerations

When sorting, the relevant sorted field values are loaded into memory. This means that per shard, there should be enough memory to contain them.



这与我对排序的理解不同。我认为某些数据类型(例如关键字)应该已经排序,因为Elasticsearch会在它们上面创建索引。这些已经排序的字段不需要重新加载到内存中即可进行排序。

我知道吗?

最佳答案

关系数据库中的索引表示B *树,并且确实已排序。

Elasticsearch中的索引是您存储数据的地方;以前我们将它与关系世界中的表进行了比较,但是由于种种原因,这并不是真的。因此,我们不要将其用作直接比较。除了上面提到的索引时间排序Val,索引不存储为基于特定字段的排序数据结构。但是,某些字段可以有效地用于排序(例如数字数据类型或未分析的文本)。这就是上面的内存考虑因素起作用的地方。

关于elasticsearch - 排序时,Elasticsearch 5会做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54626247/

相关文章:

elasticsearch - Elasticsearch 性能相关的海量数据查询

amazon-web-services - 在 logstash 中将输出配置为 elasticsearch

python - 在Elasticsearch中对大量文档进行排序

elasticsearch - 在Elasticsearch中替代_timestamp

amazon-web-services - Amazon Elasticsearch 集群的正确访问策略

java - 使用java根据elasticsearch数组中的条件获取特定值

Elasticsearch 中的日期时间 - 如何处理时区

azure - 如何在 Azure 中使用 NEST/elasticsearch?

java - 向 Elasticsearch 添加新的 HTTP 客户端以支持客户端应用程序针对 AWS Elasticsearch 运行?

elasticsearch - Logstash:从一个 Elasticsearch 迁移到另一个 Elasticsearch 结果会带来一些其他属性