zoukankan      html  css  js  c++  java
  • [elk]es增删改查最佳实战

    806469-20171112091117247-112539312.png

    PUT app01
    
    GET app01/_settings
    
    GET _all/_settings
    PUT app01/_settings
    {
      "number_of_replicas":0
    }
    
    GET _cat/health
    GET _cat/nodes
    GET _cat/indices?v
    
    
    DELETE app01
    
    
    POST app01/user/1
    {
      "name":"bob",
      "gender":"male",
      "age":17
    }
    
    
    POST app01/user/2
    {
      "name":"cristin",
      "gender":"femail",
      "age":19
    }
    
    POST app01/user/3
    {
      "name":"emy",
      "gender":"female",
      "age":20
    }
    
    
    PUT app01/user/4
    {
      "name":"aaron",
      "gender":"male",
      "age":23
    }
    
    
    GET app01/user/_search
    GET app01/user/1
    GET app01/user/1?_source
    GET app01/user/1?_source=gender,age
    
    
    
    
    
    PUT testdb/job1/1
    {
      "title": "job1_1"
    }
    
    
    PUT testdb/job1/2
    {
      "title": "job1_2"
    }
    
    
    PUT testdb/job2/1
    {
      "title": "job2_1"
    }
    
    PUT testdb/job2/2
    {
      "title": "job2_2"
    }
    
    
    GET _mget
    {
      "docs": [
        {
          "_index":"testdb",
          "_type":"job1",
          "_id": 1
        },
        {
          "_index":"testdb",
          "_type":"job2",
          "_id": 2
        }
        ]
    }
    
    
    
    GET testdb/_mget
    {
      "docs": [
        {
          "_type":"job1",
          "_id": 1
        },
        {
          "_type":"job2",
          "_id": 2
        }
        ]
    }
    
    GET testdb/job1/_mget
    {
      "docs": [
        {
          "_id": 1
        },
        {
          "_id": 2
        }
        ]
    }
    
    GET testdb/job1/_mget
    {
      "ids": [1,2]
    }
    
    
    PUT _bulk
    {"index":{"_index":"lagou","_type":"job","_id":"1"}}
    {"title":"python分布式爬虫开发","salary_min":15000,"city":"深圳","company":{"name":"腾讯","company_addr":"深圳市软件园"},"publish_date":"2017-11-11","comments":15}
    {"index":{"_index":"lagou","_type":"job","_id":"2"}}
    {"title":"django开发","salary_min":15000,"city":"上海","company":{"name":"阿里","company_addr":"广州市软件园"},"publish_date":"2017-11-12","comments":20}
    
    
    {"index":{"_index":"testdb","_type":"job","_id":"1"}}
    {"filed1":"value1"}
    
    {"delete":{"_index":"testdb","_type":"job","_id":"1"}}
    
    {"create":{"_index":"testdb","_type":"job","_id":"1"}}
    {"filed1":"value1"}
    
    {"update":{"_index":"testdb","_type":"job","_id":"1"}}
    {"doc":{"filed2":"value2"}}
    
    
    
    
    
  • 相关阅读:
    phpMyAdmin <= 4.0.4.1 import.php GLOBALS变量注入漏洞
    第一个VC++ win32程序 绘制简单图形
    QTP 9.2 下载&破解
    MacOS下使用VMware5 破解 安装win7 ISO 激活
    win7 原版下载&激活
    jQuery.ui autoComplete使用
    SubLime2 win + mac keygen
    为Chrome添加https搜索 自定义地址栏搜索引擎
    jQuery validate入门
    Bootstrap dropdown 使用
  • 原文地址:https://www.cnblogs.com/twodog/p/12138815.html
Copyright © 2011-2022 走看看