"Elasticsearch API 인덱스 생성"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
3번째 줄: 3번째 줄:
;Elasticsearch API 인덱스 생성
;Elasticsearch API 인덱스 생성


<source lang='console'>
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"}
</source>
<source lang='console'>
<source lang='console'>
testuser@localhost:~$ curl -u elastic:elastic -X PUT localhost:9200/twitter?pretty
testuser@localhost:~$ curl -u elastic:elastic -X PUT localhost:9200/twitter?pretty
35번째 줄: 41번째 줄:
==대량 생성==
==대량 생성==
<source lang='bash'>
<source lang='bash'>
for i in {101..200}; do curl -X PUT localhost:9200/myindex$i; done
for i in {101..200}; do curl -X PUT localhost:9200/myindex$i; echo; done
</source>
</source>
<source lang='console'>
<source lang='console'>
51번째 줄: 57번째 줄:
* [[Elasticsearch API 모든 인덱스 삭제]]
* [[Elasticsearch API 모든 인덱스 삭제]]
* [[Elasticsearch API 인덱스 목록 용량 조회 /_cat/indices]]
* [[Elasticsearch API 인덱스 목록 용량 조회 /_cat/indices]]
* [[Elasticsearch API 문서 생성]]


==참고==
==참고==

2019년 12월 23일 (월) 18:46 기준 최신판

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 }}