본문 바로가기

IT/Elasticsearch

[Elasticsearch] Monitoring Rest Api 1. 전체  cluster health 체크  http://localhost:9200/_cluster/health?pretty     status : green,yellow,red     active_primary_shards : primary shard 수     active_shards : primary + replica     initializing_shards : restart후 disk에서 읽은 shards 수     unassigned_shards : cluster노드에 수가 적든 무슨원인으로 아직 할당 못한 shard     number_of_pending_tasks : 아직 수행못한 변경  http://localhost:9200/_cluster/health?pretty&level=indic.. 더보기
[Elasticsearch] Elasticsearch In Action - 5 5.3 분석 API로 텍스트 분석하기 #settings #analyzer #tokenizer #mapping curl -XPOST 'localhost:9200/myindex?pretty' -d '{ "settings" : {"number_of_shards" : 2,"number_of_replicas" : 1,"index" : {"analysis" : {"analyzer" : {"myCustomAnalyzer" : {"type" : "custom","tokenizer" : "myCustomTokenizer","filter" : ["myCustomFilter1", "myCustomFilter2"],"char_filter" : ["myCustomCharFilter"]}},"tokenizer" : {"myCus.. 더보기
[Elasticsearch] Elasticsearch In Action - 3,4 3.3 배열과 다중 필드 3.3.1 배열 curl -XPUT 'localhost:9200/blog/posts/1' -d ' {"tags" : ["first", "initial"]}'# 배열 필드는 mapping에서 정의하지 않아도 된다. (알아서 해준다) 3.3.2 다중 필드 curl -XPUT 'localhost:9200/blog/_mapping/posts' -d '{"posts" : {"properties" : {"tags" : {"type" : "string","index" : "analyzed","filed" : {"verbatim" : {"type" : "string","index" : "not_analyzed"}}}}}}'# 문자열을 위한 다중 필드: 한 번은 analyzed, 다은 한 번은 .. 더보기
[config 설정] ##### elasticsearch.yml ##### cluster.name: 클러스터명node.name: 노드명 path.conf: 설정 파일 경로 (default: config/)path.data: 데이터 파일 경로 (default: data/path.work: 임시 작업 파일 경로path.logs: 로그 파일 경로 (default: logs/)path.plugins: 플러그인이 설치되는 경로 bootstrap.mlockall: 자바 가상머신이 엘라스틱서치가 사용하지 않는 메모리를 swap 하는것을 방지시킬 수 있다. (true/false)- true 권장- 시스템 전체 메모리의 50%가 넘지 않도록 하는것이 안정적이다. network.bind_host: 엘라스틱서치 서버의 내부 IP주소network.. 더보기
[ElasticSearch-1 start stop] ===== 시작과 종료 ===== - 시작 sh - echo 'bin/elasticsearch -d -p es.pid' > start.sh - 종료 sh - echo 'kill `cat es.pid`' > shutdown.sh 더보기
[Elasticsearch] head plugin 설치 $ bin/plugin install mobz/elasticsearch-head 웹상에서의 확인 http://localhost:9200/_plugin/head/ 더보기