gpt4 book ai didi

elasticsearch - 源过滤和elasticsearch get API中的fields选项有什么区别?

转载 作者:行者123 更新时间:2023-11-29 02:50:06 26 4
gpt4 key购买 nike

我对 source filtering 感到困惑(即使用 _source_include 参数)和 fields elasticsearch 中 GET API 的选项。它们在性能方面有何不同?它们应该在什么时候使用?

最佳答案

更新:回复:字段

如果您刚从 future 来到这里,请注意这是 1.x 文档。

For backwards compatibility, if the fields parameter specifies fields which are not stored (store mapping set to false), it will load the _source and extract it from it. This functionality has been replaced by the source filtering parameter.

-- https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-request-fields.html#search-request-fields


事实:

_source 告诉 elasticsearch 是否在响应中包含匹配文档的 source。 “源”是文档中插入的数据。

fields 告诉 elasticsearch 包含source,但包含定义的fields

性能:除非您的 Elasticsearch 服务器带宽较低,否则它可以忽略不计。

关于elasticsearch - 源过滤和elasticsearch get API中的fields选项有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28805577/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com