gpt4 book ai didi

Elasticsearch 查询 - 按 @timestamp 和另一个字段排序?

转载 作者:行者123 更新时间:2023-12-02 22:15:05 35 4
gpt4 key购买 nike

我可以搜索 elasticsearch(2.3 版)并在搜索查询中按 1 个以上的字段排序吗?
现在我按@timestamp 排序,我也想按主机名排序。

谢谢,

最佳答案

doc说,您可以在特定字段上添加一种或多种排序,如下所示:

"sort" : [{ "@timestamp" : "desc" },
{ "hostname " : "desc" }]

关于Elasticsearch 查询 - 按 @timestamp 和另一个字段排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46512487/

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