我想搜索query_string包含Bob和Industry_Type_ID任8OR 9.
我得到一个解析错误: Parse Failure [No parser for element [Industry_Type_ID]]
{
"query" : {
"query_string":{"query":"Bob"},
"terms" : {
"Industry_Type_ID" : [ "8", "9" ],
"minimum_match" : 1
}
}
}
Run Code Online (Sandbox Code Playgroud)
我相信我错过了一些明显的东西.
您可以使用两个子句的bool查询来执行此操作must:
{
"query" : {
"bool" : {
"must" : [
{
"query_string":{"query":"Bob"}
},
{
"terms" : {
"Industry_Type_ID" : [ "8", "9" ],
"minimum_match" : 1
}
}
]
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2797 次 |
| 最近记录: |