SlideShare uma empresa Scribd logo
1 de 26
ElasticSearch
 A search engine “ready to fly”




                                  Medcl/2012/2/18
About me
• Medcl




•   medcl@sina
•   medcl@github
•   m@medcl.net
•   log.medcl.net
Why I am here?
• 好东西需要与大家一起分享!
What’s elasticsearch
• “Distributed, (Near) Real Time, Search Engine”

•   Open Source(Apache 2.0)
•   RESTful
•   Free Schema(Dynamic)
•   MultiTenant
•   Scalable
•   High Availability
•   Rich Search Features
•   Good Extensibility
•   ……
first impression
Let’s start
 the trip
Debug Tools
Index a document
curl –XPOST http://localhost:9200/myindex/share/1
-d’ Field
                      字段内容
      字段名称                                 RESTful
{                                          URL地址
  "url" : "http://www.lamper.cn/",
  "date" : "2012-02-18 13:00:00",
  "location" : "beijing,北京"
}’

                      索引文档内容,
                        Json格式
Index Response
{
    "ok": true,
    "_index": "myindex",
    "_type": "share",
    "_id": "1",
    "_version": 1
}
Explain the url

                              索引文档
  服务器IP地址         索引名称
                              唯一标识

http://localhost:9200/myindex/share/1

     HTTP端口          索引类型名称
Query the document

  ES服务器地址                 类型名称       指定查询条件
curl –XGET
http://localhost:9200/myindex/share/_search?q
=location:beijing
                      索引名称         搜索RESTful接口
    查询条件,
    字段名:值
Search Response
{ "took": 12, "timed_out": false,
   "_shards": {      "total": 5,   "successful": 5,   "failed": 0 },
   "hits": {
     "total": 1,     "max_score": 0.5,
     "hits": [ {
           "_index": "myindex",
           "_type": "share",
           "_id": "1",
           "_score": 0.5,
           "_source": {
             "url": "http://www.lamper.cn/",
             "date": "2012-02-18 13:00:00",
             "location": "beijing,北京"
           }       }    ] }}
Queries
http://localhost:9200/myindex/share/_search?q=
beijing
http://localhost:9200/myindex/share,conf/_searc
h?q=beijing
http://localhost:9200/myindex/_search?q=beijing
http://localhost:9200/myindex,myindex2/_search
?q=beijing
http://localhost:9200/_search?q=beijing
QueryDSL
curl -XPOST
http://localhost:9200/myindex/_search –d’
{
   "query": {                   Why QueryDSL?
     "term": {                Filters、Caching、
       "location": "beijing" Highlighting、Facet、
                                ComplexQuery
     }                                ……

   }
}’
Scalability&HA
Distributed Lucene Directory
• 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.
Automatic shard allocation




From:http://www.slideshare.net/elasticsearch/elasticsearch-at-berlinbuzzwords-2010#
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.
Transaction log
•   Indexed / deleted doc is fully persistent
•   No need for a Lucene IndexWriter#commit
•   Managed using a transaction log / WAL
•   Full single node durability (kill dash 9)
•   Utilized when doing hot relocation of shards
•   Periodically “flushed” (calling IW#commit)
BASE
• 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.
Not Mentioned Here…
•   Versioning
•   Template
•   River
                        That’s Too Much,
•   Percolator          Discovery it yourself
•   PartialUpdate
•   Routing
•   Parent-Child Type
•   Scripting
•   ……
Community&Support
• http://github.com/elasticsearch
• http://groups.google.com/group/elasticsearch
• Irc:#elasticsearch@freenode

• qq群:190605846
• http://doc.elasticsearch.cn
• http://s.medcl.net/
BTW
• 招人in’
  – 分布式
  – 高性能
  – 海量数据处理
  – 个性化推荐            My
  – 搜索引擎           Company!




• 对以上任一感兴趣者:
  – 欢迎加入我们的团伙!
Thank you!

Mais conteúdo relacionado

Mais procurados

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Justin Smestad
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
MongoDB
 

Mais procurados (20)

Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
 
ElasticSearch for data mining
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
 
Presentation: mongo db & elasticsearch & membase
Presentation: mongo db & elasticsearch & membasePresentation: mongo db & elasticsearch & membase
Presentation: mongo db & elasticsearch & membase
 
An Introduction to Elastic Search.
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
 
MongoDB and Schema Design
MongoDB and Schema DesignMongoDB and Schema Design
MongoDB and Schema Design
 
MongoDB
MongoDBMongoDB
MongoDB
 
BigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearchBigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearch
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a...
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
 
MongoDB Hadoop DC
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!
 

Semelhante a Elastic search intro-@lamper

Semelhante a Elastic search intro-@lamper (20)

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 JVM-MX Meetup April 2016
Elasticsearch JVM-MX Meetup April 2016Elasticsearch JVM-MX Meetup April 2016
Elasticsearch JVM-MX Meetup April 2016
 
ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013
 
Workshop: Learning Elasticsearch
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
Using ElasticSearch as a fast, flexible, and scalable solution to search occu...
 
Document db
Document dbDocument db
Document db
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Webinar: Building Your First Application with MongoDB
Webinar: Building Your First Application with MongoDBWebinar: Building Your First Application with MongoDB
Webinar: Building Your First Application with MongoDB
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more...
 
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
 
Couchdb Nosql
Couchdb NosqlCouchdb Nosql
Couchdb Nosql
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Elastic pivorak
Elastic pivorakElastic pivorak
Elastic pivorak
 
A Presentation on MongoDB Introduction - Habilelabs
A Presentation on MongoDB Introduction - HabilelabsA Presentation on MongoDB Introduction - Habilelabs
A Presentation on MongoDB Introduction - Habilelabs
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Eyeing the Onion
Eyeing the OnionEyeing the Onion
Eyeing the Onion
 

Mais de medcl (6)

Using SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearchUsing SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearch
 
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 使用介绍
 
数据挖掘理论与实践
数据挖掘理论与实践数据挖掘理论与实践
数据挖掘理论与实践
 
quick intro to elastic search
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
 
Restful
RestfulRestful
Restful
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Elastic search intro-@lamper