INDEX
GET
PUT
DELETE
DOCUMENT
POST -> INDEX가 없어도 타입과 값을 명시하면 INDEX를 PUT하지않아도 생성가능
curl -XPUT http://localhost:9200/classes/class/1/ -d '
> {"title":"Algorithm","professor":"John"}'
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}
에러가 떠러짐
보니 content - type 가 정해지지않아서 그런거같다. 6.0이전에는 가능했는데 그 이후로는 안된단다.
그래서 타입을 정해주고 해보자
Json 파일을 이용한 POST
curl -XPOST http://localhost:9200/test/1/ -H 'Content-Type:application/json' -d @test.json
'오락기 > ELK' 카테고리의 다른 글
elasticsearch aggregation (0) | 2018.05.11 |
---|---|
elasticsearch search (0) | 2018.05.11 |
elasticsearch mapping (0) | 2018.05.11 |
elasticsearch bulk (0) | 2018.05.11 |
elasticsearch update (0) | 2018.05.11 |