본문 바로가기

분류 전체보기49

[ElasticSearch] search 준비https://github.com/Hongmebuilding/BigData/blob/master/ch03/simple_basketball.json BigData/ch03/simple_basketball.json at master · Hongmebuilding/BigDataElasticSearch 실습 자료. Contribute to Hongmebuilding/BigData development by creating an account on GitHub.github.com다음 자료를 넣습니다.curl -XPOST -k -u elastic:elastic -H "Content-Type: application/x-ndjson" "https://localhost:9200/classes/_bulk?pretty".. 2025. 3. 23.
[ElasticSearch] mapping mapping 은 관계형 데이터 베이스에서 스키마와 동일합니다. type을 지정해야 데이터를 안전하게 처리할 수 있기때문에mapping은 필수적입니다. "1"+1 와 같은 불상사를 막기위해서 우선 classes 라는 index 를 만들고 시작하겠습니다.curl -XPUT -k -u elastic:elastic https://localhost:9200/classes 그런 다음 아래의 자료를 이용해서 mapping 해보세요.curl -XPUT -k -u elastic:elastic -H "Content-Type: application/json" https://localhost:9200/classes/_mapping -d @classesRating_mapping.jsonhttps://github.com/Hon.. 2025. 3. 23.
[ElasticSearch] 데이터 입력, 조회, 수정, 삭제 getcurl -XGET -k -u elastic:elastic https://localhost:9200/classes putcurl -XPUT -k -u elastic:elastic https://localhost:9200/classesindex를 생성 할 수 있습니다.postcurl -XPOST -k -u elastic:elastic -H "Content-Type: application/x-ndjson" https://localhost:9200/class/_doc/1 -d '{"title":"Algorithm","professor":"John"}'document를 생성 할 수 있습니다. ID가 1인 문서를 추가하는 경우에는 _doc/1 을 붙혀줍니다. curl -XPOST -k -u elastic:e.. 2025. 3. 23.
[ElasticSearch] 실행해보기 elastic search 를 도커로 실행 해 볼 꺼에요. 버전 8부터는 security 가 default 라서 주의하셔야 해요 lsm@i ~ % curl https://localhost:9200 curl: (60) SSL certificate problem: self signed certificate in certificate chainMore details here: https://curl.se/docs/sslcerts.html 일단 도커로 image 만들고 실행해보죠docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.7.0 9200 은 appl.. 2025. 3. 23.