gpt4 book ai didi

java - 对于给定文档是否与先前定义的 Elasticsearch 查询匹配,是否可以得到正确/错误的答案?

转载 作者:行者123 更新时间:2023-12-01 18:35:13 25 4
gpt4 key购买 nike

是否可以得到给定文档是否与先前定义的 Elasticsearch 查询匹配的正确/错误答案?(主要在 java 中)

或者是否需要执行之前定义的查询,然后检查文档是否包含在响应集中?

最佳答案

elasticsearch 有一个符合您需求的渗透查询 ( documentation here )。

The percolate query can be used to match queries stored in an index.The percolate query itself contains the document that will be used asquery to match with the stored queries.

因此,就您的情况而言,您应该创建一个新索引来存储您的请求,然后尝试将您的文档与该请求进行匹配。

问候

关于java - 对于给定文档是否与先前定义的 Elasticsearch 查询匹配,是否可以得到正确/错误的答案?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60074866/

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