更新时间:2022-06-04 08:49:01
趋势是在任何可能的地方都使用 doc_values
,因为它们的性能越来越强于字段数据(尤其是从ES 1.4开始)。目前的缺点之一是您不能将它们与已分析的字符串字段和布尔字段一起使用。另一个缺点是,如果您仍在使用方面,请分别使用。 Kibana 3,因为两者都没有利用doc值,但是您可以分别迁移到聚合。升级到Kibana 4,所以这并不是真正的问题。
The trend is to use doc_values
whenever possible, as they are getting increasingly more performant than field data (especially since ES 1.4). One of the downsides for now is that you cannot use them with analyzed string fields and boolean fields. Another downside is if you're still using facets, resp. Kibana 3, as both are not leveraging doc values, but you can either migrate to aggregations, resp. upgrade to Kibana 4, so it's not really an issue.
Check out this excellent blog post by Chris Earle which explains the ins and outs of doc values vs fielddata.