2018년 3월 19일 월요일

ElasticSearch 를 윈도우에 설치하고 테스트 할때,


참고 : https://stackoverflow.com/questions/48209323/content-type-header-application-x-www-form-urlencoded-is-not-supported


-텍스트일떄는
curl -XGET localhost:9200/ -H "Content-Type: application/json" -d "{\"query\": {\"simple_query_string\" : {\"fields\" : [\"content\"], \"query\" : \"foo bar -baz\"}}}"

-json 파일일때는
curl -XPOST localhost:9200/classes/class/1/ -H "Content-Type: application/json" -d @onclass.json

_bulk 집어넣을떄 kibana 에서 편하게
Dev Tools 에서
POST _bulk
{ "index" : { "_index" : "basketball", "_type" : "record", "_id" : "1" } }
{"team" : "Golden States Warriors","name" : "Stephen Curry", "points" : 30,"rebounds" : 3,"assists" : 4, "blocks" : 5, "submit_date" : "2016-10-11"}
{ "index" : { "_index" : "basketball", "_type" : "record", "_id" : "2" } }
....

0 comments:

댓글 쓰기