gpt4 book ai didi

elasticsearch - 如何根据字段A是否存在或字段B是否存在在Elasticsearch中进行搜索?

转载 作者:行者123 更新时间:2023-12-03 00:13:16 25 4
gpt4 key购买 nike

例如

if(field A exists or field B exists){
//perform action
}

如何在 flex 搜索2.3中实现这一点?
想要对此的搜索查询

最佳答案

返回原始字段中至少具有一个非空值的文档:

{
"exists" : { "field" : "user" }
}

文档: here

关于elasticsearch - 如何根据字段A是否存在或字段B是否存在在Elasticsearch中进行搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38968652/

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