这是我查询" barack obama"与AND运算符:
{
"query": {
"match": {
"title": {
"query": "barack obama",
"operator": "and"
}
}
}
}
是否可以使用匹配查询我这样搜索?
"美国总统" AND"奥巴马"或者" hassan" AND" rouhani"
答案 0 :(得分:0)
尝试以下方法:
"query": {
"match": {
"title": {
"query": "barack obama"
}
}
},
filter: {
"or": [
{
"term": {"title":"barak obama"}
},
{
"term": {"title":"hassan"}
}
]
}
以下是参考:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-or-filter.html