dsl语法(es基本使用)

        索引库

1.创建索引库

                                put /索引库名{参数}

语法格式:

dsl语法(es基本使用)_第1张图片

 案例:

#创建索引库
PUT /xzm
{
  "mappings": {
    "properties": {
      "info":{
        "type": "text",
        "analyzer": "ik_smart"
      },
      "email":{
        "type": "keyword",
        "index": false      
      },
      "name":{
        "type": "object",
        "properties": {
          "firstName":{
            "type": "keyword"
          },
          "lastName":{
            "type":"keyword"
          }
        }
      }
    }
  }
}

2.查看索引库

                                get /索引库名

3.删除索引库

                                delete  /索引库名

4.修改索引库(索引库不能修改,只能添加属性)

 dsl语法(es基本使用)_第2张图片

         文档

1.新增数据

dsl语法(es基本使用)_第3张图片

 2.查询文档

dsl语法(es基本使用)_第4张图片

3.删除文档

dsl语法(es基本使用)_第5张图片

 4.修改文档

dsl语法(es基本使用)_第6张图片

注:

dsl语法(es基本使用)_第7张图片

 

你可能感兴趣的:(html,前端)