gpt4 book ai didi

php - “profile”不是有效的参数-Elasticsearch

转载 作者:行者123 更新时间:2023-12-03 01:27:15 25 4
gpt4 key购买 nike

这与我尚未回答的问题有关:Count the number of occurrence of my keywords from all the retrieved documents - Elasticsearch

因此,我找到了一个可能的线索,那就是使用配置文件 API /参数从检索到的文档列表中显示关键字的term frequency
Profile

现在,我正在尝试将其与以下依赖项一起用于我的应用程序:

Elasticsearch:v7.1
PHP:v7.2
Laravel:v5.7
Elasticsearch / elasticsearch PHP API:v7.1

每当我添加profile => true参数时,它就会显示以下错误

php

但是,当我在 Kibana 中使用它时,它工作得很好

Kibana Profile

Kibana Result

这是否意味着Elasticsearch / elasticsearch API中尚未实现配置文件参数?还是有技巧或解决方法?

最佳答案

您应该添加profile => true作为body数组的元素,如下所示:

$params = [
...
...
'body' => [
'profile' => true,
'query' => [
...
...
]
]
]

关于php - “profile”不是有效的参数-Elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57764531/

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