您的位置:首页 > 其它

ElasticSearch中插件kibana插入、查询(单条件、多条件)

2018-03-16 14:42 986 查看
1、往es中插入一条记录
PUT /product_index/product/3
{
    "product_name" : "方太油烟机",
    "product_desc" :  "一说到星空,就有太多美好的记忆,美丽的浩瀚宇宙,有太多说不清的神秘之处,星空太美丽,太绚烂!",
    "price" :  36.00
}

2、单条件查询
GET /product_index/_search
{
  "query": {
    "match": {
      "product_name": "toothbrush"
    }
  }
}

3、多条件查询
GET /product_index/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "product_name": "toothbrush"
          }
        },
        {
          "match": {
            "product_name": "update5"
          }
        }
      ]
    }
  }
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: