gpt4 book ai didi

elasticsearch - 在Elasticsearch上查询索引数据

转载 作者:行者123 更新时间:2023-12-02 23:41:46 26 4
gpt4 key购买 nike

我已经用“名称”和“消息”之类的词为 flex 搜索编制了数据索引。现在,我想以某种方式对索引数据进行查询,以便找到消息中使用的某种短语的频率(计数)。例如,消息是“我喜欢吃三明治”,“我喜欢吃汉堡”等,现在,我想查询在所有索引的消息中使用了多少次“喜欢” pharse。

最佳答案

听起来您在寻找术语Facet API。
看到这里:http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet.html

如果需要,您也可以使用特定字词过滤方面。请参见下页的“Facet过滤器”:http://www.elasticsearch.org/guide/reference/api/search/facets/index.html

高温超导
大卫。

关于elasticsearch - 在Elasticsearch上查询索引数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12512457/

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