SlideShare une entreprise Scribd logo
1  sur  29
ElasticSearch Introduction and quick startup medcl 9-29
introduction ElasticSearch,a distributed search solution , domain driven schema  free anything pluggable open source, distributed, RESTful Author:shay.banon (expert in search and analytics) Compass GigaSpaces Current Version 0.11.0
Features Reliable, Asynchronous Write Behind for long term persistency. (Near) Real Time Search. Built on top of Lucene. shard is a fully functional Lucene index. All the power of Lucene easily exposed through simple configuration / plugins. Per operation consistency Single document level operations are atomic, consistent, isolated and durable. Open Source under Apache 2 License.
Distributed and Highly Available Each index is fully sharded with a configurable number of shards. Each shard can have zero or more replicas. Read / Search operations performed on either replica shard.
Multi Tenant with Multi Types. Support for more than one index. Support for more than one type per index. Index level configuration (number of shards, index storage, ...).
Document oriented No need for upfront schema definition. Schema can be defined per type for customization of the indexing process.
Various set of APIs. HTTP RESTful API. Native Java API. 3rd Clients perl、python、php、ruby、groovy、erlang、.NET All APIs perform automatic node operation rerouting.
Up and run
install Zero Conf
index $ curl -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" : "Shay Banon" }'$ curl -XPUT http://localhost:9200/twitter/tweet/1 -d '{     "user": "kimchy",     "post_date": "2009-11-15T13:12:00",     "message": "Trying out Elastic Search, so far so good?" }'$ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{     "user": "kimchy",     "post_date": "2009-11-15T14:12:12",     "message": "You know, for Search" }'
Schema mapping $ curl -XPUT http://localhost:9200/twitter$ curl -XPUT http://localhost:9200/twitter/user/_mapping -d '{    "properties" : {        "name" : { "type" : "string" }    }}'
GET $ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{ "user": "kimchy", "postDate": "2009-11-15T14:12:12", "message": "You know, for Search" }'$ curl -XGET http://localhost:9200/twitter/tweet/2
Search $ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{ "user": "kimchy", "postDate": "2009-11-15T14:12:12", "message": "You know, for Search" }'$ curl -XGET http://localhost:9200/twitter/tweet/_search?q=user:kimchy$ curl -XGET http://localhost:9200/twitter/tweet/_search -d '{ "query" : { "term" : { "user": "kimchy" } } }'$ curl -XGET http://localhost:9200/twitter/_search?pretty=true -d '{ "query" : {         "range" : {             "post_date" : {                 "from" : "2009-11-15T13:00:00",                 "to" : "2009-11-15T14:30:00"             }         } } }'
multenancy $ curl -XPUT http://localhost:9200/kimchy$ curl -XPUT http://localhost:9200/elasticsearch$ curl -XPUT http://localhost:9200/elasticsearch/tweet/1 -d apos;{ "post_date": "2009-11-15T14:12:12", "message": "Zug Zug", "tag": "warcraft" }'$ curl -XPUT http://localhost:9200/kimchy/tweet/1 -d apos;{ "post_date": "2009-11-15T14:12:12", "message": "Whatyouwant?", "tag": "warcraft" }'$ curl -XGET http://localhost:9200/kimchy,elasticsearch/tweet/_search?q=tag:warcraft$ curl -XGET http://localhost:9200/_all/tweet/_search?q=tag:warcraft
Setting $ curl -XPUT http://localhost:9200/kimchy/ -d apos;index :    store:        type: memory'$ curl -XPUT http://localhost:9200/elasticsearch/ -d apos; {    "index" : {        "number_of_shards" : 2,        "number_of_replicas" : 3    }}'
Behind ElasticSearch
Modules
Zen Discovery Zen is used for both discovery and master election. A master in elasticsearch is responsible for handling nodes coming and going and allocation of shards. Note, the master is not a single point of failure, if it fails, then another node will be elected as master.  that nodes do not need to communicate with the master on each request, so its not a single point of bottleneck The readiness of nodes is done using the shard allocation algorithm. A shard allocated to a node is considered “ready” to receive requests only once it has fully initialized.
scalability  nodes that can hold data, and nodes that do not.  There is no need for a load balancer in elasticsearch, each node can receive a request, and if it can’t handle it, it will automatically delegate it to the appropriate node(s).  If you want to scale out search, you can simply have more shard replicas per shard.
automatic shard allocation From:http://www.slideshare.net/elasticsearch/elasticsearch-at-berlinbuzzwords-2010#
BASE support Each document you index is there once the index operation is done.  No need to commit or something similar to get everything persisted.  A shard can have 1 or more replicas for HA.  Gateway persistency is done in the background in an async manner.
The River A river is a pluggable service running within elasticsearch cluster pulling data (or being pushed with data) that is then indexed into the cluster.
Geo Location and Search 1. make your data geo enabled {    "pin" : {        "location" : {            "lat" : 40.12,            "lon" : -71.34        },        "tag" : ["food", "family"],        "text" : "my favorite family restaurant"    }} Find By Location Sorting Faceting … …
More details in http://www.elasticsearch.com/docs/
comparison
Compare with solr Though support dynamic schema,but it sucks  *i ,name_i,age_i,….  Distribute ,just do many replica,Master-Slave,and with a dirty query like this: http://localhost:9080/solr/select/?q=xxx:xxx&shards=localhost:8080/solr,localhost:9080/solr     WTF! Does it really RESTful?anyway, doesn’t matter
Compare with katta Featrures Makes serving large or high load indices easy Serves very large Lucene or HadoopMapfile indices as index shards on many servers Replicate shards on different servers for performance and fault-tolerance Supports pluggable network topologies Master fail-over Fast, lightweight, easy to integrate Plays well with Hadoop clusters May heavy to us(may be not) Master-Node,complex and ops will killed us?can’t be a little easy? Lack of Client and documents Inactivity Community Lake of Some Search Features
Resources
Link: http://www.elasticsearch.com http://www.elasticsearch.com/blog http://www.elasticsearch.com/docs/ http://www.elasticsearch.com/community/mailinglist/user/ http://github.com/elasticsearch References: http://highscalability.com/blog/2010/2/10/elasticsearch-open-source-distributed-restful-search-engine.html http://blog.sematext.com/2010/05/03/elastic-search-distributed-lucene/ http://mail-archives.apache.org/mod_mbox/hbase-user/201006.mbox/%3C149150.78881.qm@web50304.mail.re2.yahoo.com%3E http://www.slideshare.net/elasticsearch/elasticsearch-at-berlinbuzzwords-2010#

Contenu connexe

Tendances

Tendances (20)

Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
 
Elastic search overview
Elastic search overviewElastic search overview
Elastic search overview
 
Deep Dive Into Elasticsearch
Deep Dive Into ElasticsearchDeep Dive Into Elasticsearch
Deep Dive Into Elasticsearch
 
Elasticsearch for beginners
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginners
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Elastic stack Presentation
Elastic stack PresentationElastic stack Presentation
Elastic stack Presentation
 
Elasticsearch V/s Relational Database
Elasticsearch V/s Relational DatabaseElasticsearch V/s Relational Database
Elasticsearch V/s Relational Database
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Log analytics with ELK stack
Log analytics with ELK stackLog analytics with ELK stack
Log analytics with ELK stack
 
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
 
What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...
What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...
What Is ELK Stack | ELK Tutorial For Beginners | Elasticsearch Kibana | ELK S...
 
ElasticSearch
ElasticSearchElasticSearch
ElasticSearch
 
Elk - An introduction
Elk - An introductionElk - An introduction
Elk - An introduction
 
Kibana overview
Kibana overviewKibana overview
Kibana overview
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELK
 
Log analysis with elastic stack
Log analysis with elastic stackLog analysis with elastic stack
Log analysis with elastic stack
 

En vedette

En vedette (20)

(Elastic)search in big data
(Elastic)search in big data(Elastic)search in big data
(Elastic)search in big data
 
Elastic search Walkthrough
Elastic search WalkthroughElastic search Walkthrough
Elastic search Walkthrough
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Elastic search
Elastic searchElastic search
Elastic search
 
Elasticsearch in 15 minutes
Elasticsearch in 15 minutesElasticsearch in 15 minutes
Elasticsearch in 15 minutes
 
Elastic search & patent information @ mtc
Elastic search & patent information @ mtcElastic search & patent information @ mtc
Elastic search & patent information @ mtc
 
Elastic Search Indexing Internals
Elastic Search Indexing InternalsElastic Search Indexing Internals
Elastic Search Indexing Internals
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
James elastic search
James   elastic searchJames   elastic search
James elastic search
 
IEEE CLOUD \'11
IEEE CLOUD \'11IEEE CLOUD \'11
IEEE CLOUD \'11
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic search
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
Searching Relational Data with Elasticsearch
Searching Relational Data with ElasticsearchSearching Relational Data with Elasticsearch
Searching Relational Data with Elasticsearch
 
Don’t Redesign Your Website in the Dark: Master the redesign process with cus...
Don’t Redesign Your Website in the Dark: Master the redesign process with cus...Don’t Redesign Your Website in the Dark: Master the redesign process with cus...
Don’t Redesign Your Website in the Dark: Master the redesign process with cus...
 
Query DSL In Elasticsearch
Query DSL In ElasticsearchQuery DSL In Elasticsearch
Query DSL In Elasticsearch
 
ELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log systemELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log system
 
Scaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with ElasticsearchScaling real-time search and analytics with Elasticsearch
Scaling real-time search and analytics with Elasticsearch
 
Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Recommendations Reboot: Improving RIO with Experimentation
Recommendations Reboot: Improving RIO with ExperimentationRecommendations Reboot: Improving RIO with Experimentation
Recommendations Reboot: Improving RIO with Experimentation
 

Similaire à quick intro to elastic search

How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
琛琳 饶
 
Craig Brown speaks on ElasticSearch
Craig Brown speaks on ElasticSearchCraig Brown speaks on ElasticSearch
Craig Brown speaks on ElasticSearch
imarcticblue
 

Similaire à quick intro to elastic search (20)

Not only SQL
Not only SQL Not only SQL
Not only SQL
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
 
Managing Your Content with Elasticsearch
Managing Your Content with ElasticsearchManaging Your Content with Elasticsearch
Managing Your Content with Elasticsearch
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
 
Perl and Elasticsearch
Perl and ElasticsearchPerl and Elasticsearch
Perl and Elasticsearch
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
 
Elk presentation1#3
Elk presentation1#3Elk presentation1#3
Elk presentation1#3
 
About elasticsearch
About elasticsearchAbout elasticsearch
About elasticsearch
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
Craig Brown speaks on ElasticSearch
Craig Brown speaks on ElasticSearchCraig Brown speaks on ElasticSearch
Craig Brown speaks on ElasticSearch
 
Sinatra and JSONQuery Web Service
Sinatra and JSONQuery Web ServiceSinatra and JSONQuery Web Service
Sinatra and JSONQuery Web Service
 
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
 
Solving the Riddle of Search: Using Sphinx with Rails
Solving the Riddle of Search: Using Sphinx with RailsSolving the Riddle of Search: Using Sphinx with Rails
Solving the Riddle of Search: Using Sphinx with Rails
 
Elasticsearch and Spark
Elasticsearch and SparkElasticsearch and Spark
Elasticsearch and Spark
 
Using Thinking Sphinx with rails
Using Thinking Sphinx with railsUsing Thinking Sphinx with rails
Using Thinking Sphinx with rails
 
Hazelcast
HazelcastHazelcast
Hazelcast
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화[2D1]Elasticsearch 성능 최적화
[2D1]Elasticsearch 성능 최적화
 

Plus de medcl (7)

Using SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearchUsing SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearch
 
Elastic Search Training#1 (brief tutorial)-ESCC#1
Elastic Search Training#1 (brief tutorial)-ESCC#1Elastic Search Training#1 (brief tutorial)-ESCC#1
Elastic Search Training#1 (brief tutorial)-ESCC#1
 
ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1
 
Git 使用介绍
Git 使用介绍Git 使用介绍
Git 使用介绍
 
数据挖掘理论与实践
数据挖掘理论与实践数据挖掘理论与实践
数据挖掘理论与实践
 
Elastic search intro-@lamper
Elastic search intro-@lamperElastic search intro-@lamper
Elastic search intro-@lamper
 
Restful
RestfulRestful
Restful
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

quick intro to elastic search

  • 1. ElasticSearch Introduction and quick startup medcl 9-29
  • 2. introduction ElasticSearch,a distributed search solution , domain driven schema free anything pluggable open source, distributed, RESTful Author:shay.banon (expert in search and analytics) Compass GigaSpaces Current Version 0.11.0
  • 3. Features Reliable, Asynchronous Write Behind for long term persistency. (Near) Real Time Search. Built on top of Lucene. shard is a fully functional Lucene index. All the power of Lucene easily exposed through simple configuration / plugins. Per operation consistency Single document level operations are atomic, consistent, isolated and durable. Open Source under Apache 2 License.
  • 4. Distributed and Highly Available Each index is fully sharded with a configurable number of shards. Each shard can have zero or more replicas. Read / Search operations performed on either replica shard.
  • 5. Multi Tenant with Multi Types. Support for more than one index. Support for more than one type per index. Index level configuration (number of shards, index storage, ...).
  • 6. Document oriented No need for upfront schema definition. Schema can be defined per type for customization of the indexing process.
  • 7. Various set of APIs. HTTP RESTful API. Native Java API. 3rd Clients perl、python、php、ruby、groovy、erlang、.NET All APIs perform automatic node operation rerouting.
  • 10. index $ curl -XPUT http://localhost:9200/twitter/user/kimchy -d '{ "name" : "Shay Banon" }'$ curl -XPUT http://localhost:9200/twitter/tweet/1 -d '{     "user": "kimchy",     "post_date": "2009-11-15T13:12:00",     "message": "Trying out Elastic Search, so far so good?" }'$ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{     "user": "kimchy",     "post_date": "2009-11-15T14:12:12",     "message": "You know, for Search" }'
  • 11. Schema mapping $ curl -XPUT http://localhost:9200/twitter$ curl -XPUT http://localhost:9200/twitter/user/_mapping -d '{    "properties" : {        "name" : { "type" : "string" }    }}'
  • 12. GET $ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{ "user": "kimchy", "postDate": "2009-11-15T14:12:12", "message": "You know, for Search" }'$ curl -XGET http://localhost:9200/twitter/tweet/2
  • 13. Search $ curl -XPUT http://localhost:9200/twitter/tweet/2 -d '{ "user": "kimchy", "postDate": "2009-11-15T14:12:12", "message": "You know, for Search" }'$ curl -XGET http://localhost:9200/twitter/tweet/_search?q=user:kimchy$ curl -XGET http://localhost:9200/twitter/tweet/_search -d '{ "query" : { "term" : { "user": "kimchy" } } }'$ curl -XGET http://localhost:9200/twitter/_search?pretty=true -d '{ "query" : {         "range" : {             "post_date" : {                 "from" : "2009-11-15T13:00:00",                 "to" : "2009-11-15T14:30:00"             }         } } }'
  • 14. multenancy $ curl -XPUT http://localhost:9200/kimchy$ curl -XPUT http://localhost:9200/elasticsearch$ curl -XPUT http://localhost:9200/elasticsearch/tweet/1 -d apos;{ "post_date": "2009-11-15T14:12:12", "message": "Zug Zug", "tag": "warcraft" }'$ curl -XPUT http://localhost:9200/kimchy/tweet/1 -d apos;{ "post_date": "2009-11-15T14:12:12", "message": "Whatyouwant?", "tag": "warcraft" }'$ curl -XGET http://localhost:9200/kimchy,elasticsearch/tweet/_search?q=tag:warcraft$ curl -XGET http://localhost:9200/_all/tweet/_search?q=tag:warcraft
  • 15. Setting $ curl -XPUT http://localhost:9200/kimchy/ -d apos;index :    store:        type: memory'$ curl -XPUT http://localhost:9200/elasticsearch/ -d apos; {    "index" : {        "number_of_shards" : 2,        "number_of_replicas" : 3    }}'
  • 18. Zen Discovery Zen is used for both discovery and master election. A master in elasticsearch is responsible for handling nodes coming and going and allocation of shards. Note, the master is not a single point of failure, if it fails, then another node will be elected as master.  that nodes do not need to communicate with the master on each request, so its not a single point of bottleneck The readiness of nodes is done using the shard allocation algorithm. A shard allocated to a node is considered “ready” to receive requests only once it has fully initialized.
  • 19. scalability  nodes that can hold data, and nodes that do not. There is no need for a load balancer in elasticsearch, each node can receive a request, and if it can’t handle it, it will automatically delegate it to the appropriate node(s). If you want to scale out search, you can simply have more shard replicas per shard.
  • 20. automatic shard allocation From:http://www.slideshare.net/elasticsearch/elasticsearch-at-berlinbuzzwords-2010#
  • 21. BASE support Each document you index is there once the index operation is done. No need to commit or something similar to get everything persisted. A shard can have 1 or more replicas for HA. Gateway persistency is done in the background in an async manner.
  • 22. The River A river is a pluggable service running within elasticsearch cluster pulling data (or being pushed with data) that is then indexed into the cluster.
  • 23. Geo Location and Search 1. make your data geo enabled {    "pin" : {        "location" : {            "lat" : 40.12,            "lon" : -71.34        },        "tag" : ["food", "family"],        "text" : "my favorite family restaurant"    }} Find By Location Sorting Faceting … …
  • 24. More details in http://www.elasticsearch.com/docs/
  • 26. Compare with solr Though support dynamic schema,but it sucks *i ,name_i,age_i,…. Distribute ,just do many replica,Master-Slave,and with a dirty query like this: http://localhost:9080/solr/select/?q=xxx:xxx&shards=localhost:8080/solr,localhost:9080/solr WTF! Does it really RESTful?anyway, doesn’t matter
  • 27. Compare with katta Featrures Makes serving large or high load indices easy Serves very large Lucene or HadoopMapfile indices as index shards on many servers Replicate shards on different servers for performance and fault-tolerance Supports pluggable network topologies Master fail-over Fast, lightweight, easy to integrate Plays well with Hadoop clusters May heavy to us(may be not) Master-Node,complex and ops will killed us?can’t be a little easy? Lack of Client and documents Inactivity Community Lake of Some Search Features
  • 29. Link: http://www.elasticsearch.com http://www.elasticsearch.com/blog http://www.elasticsearch.com/docs/ http://www.elasticsearch.com/community/mailinglist/user/ http://github.com/elasticsearch References: http://highscalability.com/blog/2010/2/10/elasticsearch-open-source-distributed-restful-search-engine.html http://blog.sematext.com/2010/05/03/elastic-search-distributed-lucene/ http://mail-archives.apache.org/mod_mbox/hbase-user/201006.mbox/%3C149150.78881.qm@web50304.mail.re2.yahoo.com%3E http://www.slideshare.net/elasticsearch/elasticsearch-at-berlinbuzzwords-2010#