2024-04-25 06:03:41 发布
网友
我正在尝试获得一个非常基本的过滤查询来使用Elasticsearch。你知道吗
{ "query": { "bool": { "must": { "match_all": {} }, "filter": { "term": { "name": "stanford designs" } } } } }
奇怪的是,您的查询看起来很好,但可能您使用的是一些旧版本的Elastics。 您可以使用bool must before term filter,如下所示:
{ "query": { "bool": { "must": { "match_all": {} }, "filter": { "bool": { "must": [ { "term": { "name": "stanford designs" } } ] } } } } }
希望这能奏效。你知道吗
奇怪的是,您的查询看起来很好,但可能您使用的是一些旧版本的Elastics。 您可以使用bool must before term filter,如下所示:
希望这能奏效。你知道吗
相关问题 更多 >
编程相关推荐