0
{
  "query": {
    "bool": {
      "or": [
         {"match_phrase": {"text":  "first phrase"}},
         {"match_phrase": {"text":  "second phrase"}}
      ]
    }
 }
}

我想匹配包含与输入的短语之一完全相同的所有文档。

4

1 回答 1

0
{
    "query": {
        "constant_score" : {
            "filter" : {
                 "bool" : {
                    "or" : [
                        { "term" : { "text" : "first phrase" } }, 
                        { "term" : { "text" : "second phrase" } } 
                    ]
                }
            }
        }
    }
}
于 2018-01-09T17:04:31.170 回答