Elasticsearch API 인덱스 생성

1 개요[ | ]

Elasticsearch API - Create index
Elasticsearch API 인덱스 생성
root@localhost:~# curl -X PUT localhost:9200/myindex01
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex01"}
root@localhost:~# curl -X PUT localhost:9200/myindex02
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex02"}
testuser@localhost:~$ curl -u elastic:elastic -X PUT localhost:9200/twitter?pretty
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "twitter"
}
testuser@localhost:~$ curl -u elastic:elastic -X GET localhost:9200/twitter?pretty
{
  "twitter" : {
    "aliases" : { },
    "mappings" : { },
    "settings" : {
      "index" : {
        "creation_date" : "1571967959548",
        "number_of_shards" : "1",
        "number_of_replicas" : "1",
        "uuid" : "kKLHtQezSKCjdTvLl3HluQ",
        "version" : {
          "created" : "7010199"
        },
        "provided_name" : "twitter"
      }
    }
  }
}

2 대량 생성[ | ]

for i in {101..200}; do curl -X PUT localhost:9200/myindex$i; echo; done
root@localhost:~# for i in {101..200}; do curl -X PUT localhost:9200/myindex$i; echo; done
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex101"}
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex102"}
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex103"}
...
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex199"}
{"acknowledged":true,"shards_acknowledged":true,"index":"myindex200"}

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}