elasticsearch 增刪改查 ---長期更新

1、單字段 多個搜索值 的 模糊查詢

使用 bool 的 should 去查詢。

{
  "query": {
    "bool": {
      "must": [
        {
          "bool": {
            "should": [
              {
                "wildcard": {
                  "mobile": {
                    "value": "13*"
                  }
                }
              },
              {
                "wildcard": {
                  "mobile": {
                    "value": "17712345986"
                  }
                }
              }
            ]
          }
        }
      ]
    }
  }
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章