• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Elasticsearch 설치 및 기본 활용
 

Elasticsearch 설치 및 기본 활용

on

  • 5,343 views

엘라스틱서치 기본 활용 강좌입니다.

엘라스틱서치 기본 활용 강좌입니다.

Statistics

Views

Total Views
5,343
Views on SlideShare
1,127
Embed Views
4,216

Actions

Likes
4
Downloads
20
Comments
3

21 Embeds 4,216

http://www.elasticsearch.org 2299
http://elasticsearch.kr 1673
http://feedly.com 99
http://digg.com 38
http://elasticsearch.or.kr 31
http://www.newsblur.com 27
http://newsblur.com 16
http://candoitsoft.kr 7
http://www.feedspot.com 6
http://www.inoreader.com 5
http://ec2-54-199-167-213.ap-northeast-1.compute.amazonaws.com 4
http://beta.bazqux.com 2
http://inoreader.com 1
http://feedmark.me 1
http://54.199.167.213 1
http://feeds.feedburner.com 1
http://plus.url.google.com 1
http://127.0.0.1 1
https://reader.aol.com 1
http://reader.aol.com 1
http://webcache.googleusercontent.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • @dhrim 감사드립니다. :) 저도 아직 배워가는 과정에 있습니다. Elasticsearch 많은 활용 부탁드리겠습니다.
    Are you sure you want to
    Your message goes here
    Processing…
  • 좋은 내용을 소개하고 공유해주셔서 감사합니다.
    Are you sure you want to
    Your message goes here
    Processing…
  • OKJSP 참석했던 임도형입니다.
    Elasticsearch에 감탄했습니다. 간단하고, 깔끔하고, 쉽고.
    감사합니다.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Elasticsearch 설치 및 기본 활용 Elasticsearch 설치 및 기본 활용 Presentation Transcript

    • ELASTICSEARCH 김종민 E-mail : kimjmin@gmail.com Blog : http://kimjmin.net Twitter : @kimjmin
    • Elasticsearch • Schema-free • Distributed & horizontally scalable • Restful API • JSON Document based • Open Source : Apache License 2.0 • Written in Java • Apache Lucene.
    • Elasticsearch 1분만에 설치하기 • wget https://download.elasticsearch.org/ ... /elasticsearch- 1.0.1.tar.gz http://www.elasticsearch.org/download/ • tar –xvfz elasticsearch-1.0.1.tar.gz • cd elasticsearch-1.0.1 • bin/elasticsearch [-d]
    • 살아있는지 체크 (curl & 브라우저) $ curl localhost:9200 { "status" : 200, "name" : "Arcade", "version" : { "number" : "1.0.1", "build_hash" : "5c03844e1978e5cc924dab2a423dc63ce881c42b", "build_timestamp" : "2014-02-25T15:52:53Z", "build_snapshot" : false, "lucene_version" : "4.6" }, "tagline" : "You Know, for Search" }
    • 데이터 구조 관계 DB Elasticsearch Database Index Table Type Row Document Column Field Schema Mapping
    • 데이터 입력 • curl -XPUT host:port/<인덱스>/<타입>/[id] $ curl -XPUT localhost:9200/books/book/1 -d ' { "title" : "Elasticsearch Guide ", "author" : "Kim", "started" : "2014-03-14", "pages" : 250 }' {"_index":"books","_type":"book","_id":"1","_version":1,"created":true}
    • 데이터 수정 • 동일한 Index/Type/ID 로 데이터 입력 $ curl -XPUT localhost:9200/books/book/1 -d ' { "title" : "Elasticsearch Guide", "author" : ["Kim", "Lee"], "started" : "2014-03-14", "pages" : 250 }' {"_index":"books","_type":"book","_id":"1","_version":2,"created":false}
    • 데이터 확인 $ curl -XGET localhost:9200/books/book/1 {"_index":"books","_type":"book","_id":"1","_version":2,"found":true, "_source" : { "title" : "Elasticsearch Guide", "author" : ["Kim", "Lee"], "started" : "2014-03-14", "pages" : 250 } }
    • 데이터 삭제 $ curl -XDELETE localhost:9200/books/book/1 {"found":true,"_index":"books","_type":"book","_id":"1","_version":3}
    • URI 검색 $ curl –XGET localhost:9200/books/book/_search?q=elasticsearch $ curl -XGET localhost:9200/books/book/_search?q=easy {"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"t otal":1,"max_score":0.095891505,"hits":[{"_index":"books","_type":"book","_id":" 2","_score":0.095891505, "_source" : { "title" : "Elasticsearch Easy Guide 2", "author" : ["Kim","Lee"], "started" : "2014-03-20", "pages" : 300 }}]}}
    • URI 검색 (계속) $ curl –XGET localhost:9200/books/book/_search?q=title:elasticsearch $ curl -XGET localhost:9200/books/book/_search?q=author:elasticsearh {"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"t otal":0,"max_score":null,"hits":[]}}
    • Request Body 검색 $ curl localhost:9200/books/book/_search -d ' { "query" : { "term" : { "title" : "elasticsearch" } } }'
    • Shard & Replicas (Head plugin) • bin/plugin -install mobz/elasticsearch-head $ curl -XPUT localhost:9200/books -d ' { "settings" : { "number_of_shards" : 4, "number_of_replicas" : 1 } }' $ curl -XPUT localhost:9200/magazine -d ' { "settings" : { "number_of_shards" : 2, "number_of_replicas" : 0 } }'
    • Shard & Replicas
    • Shard & Replicas
    • 환경 설정 - 노드명 • config/elasticsearch.yml • cluster.name: elasticsearch • node.name: “node1” • bin/elasticsearch -Des.node.name=node1 • bin/elasticsearch --node.name=node1
    • 노드 바인딩 • 실행 포트 : 9200~ • 바인딩 포트 : 9300~
    • 환경 설정 – 마스터노드, 데이터노드 • config/elasticsearch.yml • node.master: false • node.data: true • bin/elasticsearch -Des.node.data=true • bin/elasticsearch --node.data=true
    • 환경 설정 – 마스터노드, 데이터노드
    • 감사합니다 • http://elasticsearch.or.kr • 한국 엘라스틱서치 유저그룹 https://www.facebook.com/groups/elasticsearch.kr/