반응형

<Curl 사용> - index조회 쿼리 curl -X GET "localhost:9200/_cat/ indices?v - index생성쿼리 

curl -X PUT "localhost:9200/ <인덱스명>?pretty

ex) curl -X PUT "localhost:9200/ staff?pretty

 

 < DevTools 사용>

 - 모든 index 조회 쿼리

  ## 모든 Index조회 
  GET /_cat/indices?v

 

 - 생성 

## staff index 생성
PUT /staff/

 

- 생성 후  index 조회 

## staff 라는 index가 생성됨을 확인
GET /_cat/indices?v

 

- index에 데이터 입력 

## staff 라는 type1=type1,  id=1,를 갖는 data 생성
##   POST  <index>/type/id 값
POST staff/type1/1
{
  "name" : "mike",
  "lastname" : "lee",
  "job" : "operator"
}

 

반응형

+ Recent posts