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

(같은 사용자의 중간 판 5개는 보이지 않습니다)
31번째 줄: 31번째 줄:
   }
   }
}
}
</source>
==대량 생성==
<source lang='bash'>
for i in {101..200}; do curl -X PUT localhost:9200/myindex$i; echo; done
</source>
<source lang='console'>
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"}
</source>
</source>


==같이 보기==
==같이 보기==
* [[Elasticsearch API 인덱스 삭제]]
* [[Elasticsearch API 인덱스 삭제]]
* [[Elasticsearch API cat/indices]]
* [[Elasticsearch API 모든 인덱스 삭제]]
* [[Elasticsearch API 인덱스 목록 용량 조회 /_cat/indices]]


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

2019년 12월 12일 (목) 16:24 판

1 개요

Elasticsearch API - Create index
Elasticsearch API 인덱스 생성
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 }}