我想在should请求中过滤某些_ids的文档。这就是我的尝试:
{
"query": {
"filtered": {
"filter": {
"bool": {
"should": [
{
"_id": "abc"
},
{
"_id": "def"
}
]
}
}
}
}
}
错误讯息:
{"错误":" SearchPhaseExecutionException [无法执行阶段[查询],所有分片都失败; shardFailures {[-Qaf9MhvRhasY5h92lDrXg] [appsearch] [0]:SearchParseException [[appsearch] [0]:from [-1],size [-1]:Parse Failure [无法解析源代码
答案 0 :(得分:0)
问题的解决方案是添加:
{"term":{"_id":"abc"}}