Elastic search intro-@lamper

M
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
Elastic search intro-@lamper
Elastic search intro-@lamper
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!
1 of 26

Recommended

曾勇 Elastic search-intro by
曾勇 Elastic search-intro曾勇 Elastic search-intro
曾勇 Elastic search-introShaoning Pan
1.1K views27 slides
10gen MongoDB Video Presentation at WebGeek DevCup by
10gen MongoDB Video Presentation at WebGeek DevCup10gen MongoDB Video Presentation at WebGeek DevCup
10gen MongoDB Video Presentation at WebGeek DevCupWebGeek Philippines
905 views30 slides
Data modeling for Elasticsearch by
Data modeling for ElasticsearchData modeling for Elasticsearch
Data modeling for ElasticsearchFlorian Hopf
12.7K views99 slides
ElasticSearch - index server used as a document database by
ElasticSearch - index server used as a document databaseElasticSearch - index server used as a document database
ElasticSearch - index server used as a document databaseRobert Lujo
5.5K views43 slides
Dcm#8 elastic search by
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic searchIvan Wallarm
606 views16 slides
James elastic search by
James   elastic searchJames   elastic search
James elastic searchLearningTech
537 views11 slides

More Related Content

What's hot

Intro to elasticsearch by
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearchJoey Wen
562 views40 slides
ElasticSearch for data mining by
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining William Simms
6.7K views13 slides
Elastic Search by
Elastic SearchElastic Search
Elastic SearchNavule Rao
964 views22 slides
Introduction to MongoDB by
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBJustin Smestad
5.5K views105 slides
Introduction to mongo db by
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo dbRohit Bishnoi
739 views44 slides
Building Your First Application with MongoDB by
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDBMongoDB
3.7K views40 slides

What's hot(20)

Intro to elasticsearch by Joey Wen
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
Joey Wen562 views
ElasticSearch for data mining by William Simms
ElasticSearch for data mining ElasticSearch for data mining
ElasticSearch for data mining
William Simms6.7K views
Elastic Search by Navule Rao
Elastic SearchElastic Search
Elastic Search
Navule Rao964 views
Introduction to mongo db by Rohit Bishnoi
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
Rohit Bishnoi739 views
Building Your First Application with MongoDB by MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
MongoDB3.7K views
Presentation: mongo db & elasticsearch & membase by Ardak Shalkarbayuli
Presentation: mongo db & elasticsearch & membasePresentation: mongo db & elasticsearch & membase
Presentation: mongo db & elasticsearch & membase
Ardak Shalkarbayuli1.1K views
An Introduction to Elastic Search. by Jurriaan Persyn
An Introduction to Elastic Search.An Introduction to Elastic Search.
An Introduction to Elastic Search.
Jurriaan Persyn71.1K views
Elastic Search by Lukas Vlcek
Elastic SearchElastic Search
Elastic Search
Lukas Vlcek2.7K views
Building your first app with MongoDB by Norberto Leite
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
Norberto Leite974 views
Webinar: Developing with the modern App Stack: MEAN and MERN (with Angular2 a... by MongoDB
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...
MongoDB15.5K views
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati by Robert Calcavecchia
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 by Mike Dirolf
MongoDB Hadoop DCMongoDB Hadoop DC
MongoDB Hadoop DC
Mike Dirolf1.3K views
Introduction to MongoDB by MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
MongoDB7.2K views

Similar to Elastic search intro-@lamper

Elastic Search Training#1 (brief tutorial)-ESCC#1 by
Elastic Search Training#1 (brief tutorial)-ESCC#1Elastic Search Training#1 (brief tutorial)-ESCC#1
Elastic Search Training#1 (brief tutorial)-ESCC#1medcl
5.7K views94 slides
Elasticsearch JVM-MX Meetup April 2016 by
Elasticsearch JVM-MX Meetup April 2016Elasticsearch JVM-MX Meetup April 2016
Elasticsearch JVM-MX Meetup April 2016Domingo Suarez Torres
976 views38 slides
ElasticSearch AJUG 2013 by
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013Roy Russo
69.1K views40 slides
Workshop: Learning Elasticsearch by
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning ElasticsearchAnurag Patel
15.6K views57 slides
Mongodb intro by
Mongodb introMongodb intro
Mongodb introchristkv
4.1K views37 slides
Elasticsearch & "PeopleSearch" by
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"George Stathis
2K views25 slides

Similar to Elastic search intro-@lamper(20)

Elastic Search Training#1 (brief tutorial)-ESCC#1 by medcl
Elastic Search Training#1 (brief tutorial)-ESCC#1Elastic Search Training#1 (brief tutorial)-ESCC#1
Elastic Search Training#1 (brief tutorial)-ESCC#1
medcl5.7K views
ElasticSearch AJUG 2013 by Roy Russo
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013
Roy Russo69.1K views
Workshop: Learning Elasticsearch by Anurag Patel
Workshop: Learning ElasticsearchWorkshop: Learning Elasticsearch
Workshop: Learning Elasticsearch
Anurag Patel15.6K views
Mongodb intro by christkv
Mongodb introMongodb intro
Mongodb intro
christkv4.1K views
Using ElasticSearch as a fast, flexible, and scalable solution to search occu... by kristgen
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...
kristgen4.3K views
Webinar: Building Your First Application with MongoDB by MongoDB
Webinar: Building Your First Application with MongoDBWebinar: Building Your First Application with MongoDB
Webinar: Building Your First Application with MongoDB
MongoDB6.2K views
Practical Use of MongoDB for Node.js by async_io
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io19.9K views
Elasticsearch, Logstash, Kibana. Cool search, analytics, data mining and more... by Oleksiy Panchenko
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...
Oleksiy Panchenko5.1K views
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine by Daniel N
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search EngineElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
ElasticSearch: Distributed Multitenant NoSQL Datastore and Search Engine
Daniel N737 views
Building APIs in an easy way using API Platform by Antonio Peric-Mazar
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
Antonio Peric-Mazar2.6K views
A Presentation on MongoDB Introduction - Habilelabs by Habilelabs
A Presentation on MongoDB Introduction - HabilelabsA Presentation on MongoDB Introduction - Habilelabs
A Presentation on MongoDB Introduction - Habilelabs
Habilelabs2K views

More from medcl

Using SaltStack To AutoDeploy ElasticSearch by
Using SaltStack To AutoDeploy ElasticSearchUsing SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearchmedcl
3.5K views32 slides
ElasticSearch Training#2 (advanced concepts)-ESCC#1 by
ElasticSearch Training#2 (advanced concepts)-ESCC#1ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1medcl
4.5K views56 slides
Git 使用介绍 by
Git 使用介绍Git 使用介绍
Git 使用介绍medcl
1.1K views32 slides
数据挖掘理论与实践 by
数据挖掘理论与实践数据挖掘理论与实践
数据挖掘理论与实践medcl
3.2K views36 slides
quick intro to elastic search by
quick intro to elastic search quick intro to elastic search
quick intro to elastic search medcl
16.9K views29 slides
Restful by
RestfulRestful
Restfulmedcl
1.3K views18 slides

More from medcl(6)

Using SaltStack To AutoDeploy ElasticSearch by medcl
Using SaltStack To AutoDeploy ElasticSearchUsing SaltStack To AutoDeploy ElasticSearch
Using SaltStack To AutoDeploy ElasticSearch
medcl3.5K views
ElasticSearch Training#2 (advanced concepts)-ESCC#1 by medcl
ElasticSearch Training#2 (advanced concepts)-ESCC#1ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1
medcl4.5K views
Git 使用介绍 by medcl
Git 使用介绍Git 使用介绍
Git 使用介绍
medcl1.1K views
数据挖掘理论与实践 by medcl
数据挖掘理论与实践数据挖掘理论与实践
数据挖掘理论与实践
medcl3.2K views
quick intro to elastic search by medcl
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
medcl16.9K views
Restful by medcl
RestfulRestful
Restful
medcl1.3K views

Recently uploaded

Cencora Executive Symposium by
Cencora Executive SymposiumCencora Executive Symposium
Cencora Executive Symposiummarketingcommunicati21
139 views14 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
181 views19 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
449 views92 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
253 views53 slides
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPoolShapeBlue
84 views10 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
52 views45 slides

Recently uploaded(20)

KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue181 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue84 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue197 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue93 views
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ... by ShapeBlue
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
Backup and Disaster Recovery with CloudStack and StorPool - Workshop - Venko ...
ShapeBlue144 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue88 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue94 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... by ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue146 views
Data Integrity for Banking and Financial Services by Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely78 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue154 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue by ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue176 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson156 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li80 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue222 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ by ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue88 views

Elastic search intro-@lamper