Intro to elasticsearch

J
Your Data,
Your Search !
问志光
2016-06-27
1
Outline
 Information retrieval
 Indexing & Searching
 Elasticsearch
2
Information retrieval
 Information Retrieval(IR) is finding
material(usually documents) of an unstructured
nature(usually text) that statisfies an information
need from within large collections(usually stored
on computers).
 Search Engine is a software system that is
designed to search for information. It’s a kind of
implementation of IR.
3
What is search engine?
 A search engine is
 An index engine for documents
 A search engine on indexes
 A search engine is more powerful to do
searches:
It’s designed for it !
4
Search Engine Architecture
5
6
7
8
Problems ??
 How to store the data ?
 How to index the data ?
 How to search the data ?
9
How to store the data ?
INVERTED LIST
10
How to
the data ?
INDEX
11
the follow two files
 File1: Students should be allowed to go
out with their friends, but not allowed
to drink beer.
 File2: My friend Jerry went to school to
see his students but found them drunk
which is not allowed.
12
Step 1: Tokenzier
 Split doc into words
 Remove the punctuation
 Remove stop word (the, a, this, that etc.)
“Students”,“allowed”,“go”,“their”,
“friends”,“allowed”,“drink”,“beer”,“My”,
“friend”,“Jerry”,“went”,“school”,“see”,
“his”,“students”,“found”,“them”,“drunk”,
“allowed”
13
Step2: Linguistic Processor
 Lowercase
 Stemming, cars -> car, etc.
 Lemmatizatio, drove -> drive, etc.
“student”,“allow”,“go”,“their”,“friend”
,“allow”,“drink”,“beer”,“my”,“friend”
,“jerry”,“go”,“school”,“see”,“his”,
“student”,“find”,“them”,“drink”,“allow”
Term
14
Step3: Index
Term Document ID
student 1
allow 1
go 1
their 1
friend 1
allow 1
… …
 Dict
 Sort
 Posting list
15
16
How to
the data ?
SEARCH
17
Step1: User search query
• Suppose you have the follow query:
lucene AND learned NOT hadoop
18
Step2: Lexical & Syntax Analysis
 Identify words and keywords
 Words: lucene, learned, hadoop
 Keywords: AND, NOT
 Building a syntax tree
lucene learned
hadoopAND
Not
19
Step3: Search
 Search in the Inverted List
 Sort, Conjunction, Disconjunction
 Scorer
20
full text search
RESTful API
real time,
Search and
analytics engine
open source
high availability
schema free
JSON over HTTP
Lucene based
distributed
RESTful API
ElasticSearch
21
Elastic Search
 Distributed and Highly Available Search Engine.
 Each index is fully sharded with a configurable number of shards.
 Each shard can have one or more replicas.
 Read / Search operations performed on either one of the 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.
 All APIs perform automatic node operation rerouting.
 (Near) Real Time Search.
 Reliable, Asynchronous Write Behind for long term persistency.
 Built on top of Lucene
 Each 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 the Apache License, version 2 ("ALv2")
22
Terminologies of Elastic Search
 Cluster
 Node
 Index
 Shard
23
Cluster
● A cluster is a collection of one or more
nodes (servers) that together holds your
entire data and provides federated indexing
and search capabilities across all nodes
● A cluster is identified by a unique name
which by default is "elasticsearch"
Terminologies of Elastic Search
24
Node
● It is an elasticsearch instance (a java process)
● A node is created when a elasticsearch instance is
started
● A random Marvel Charater name is allocated by
default
Terminologies of Elastic Search
25
Index
● An index is a collection of documents that have
somewhat similar characteristics. eg:customer data,
product catalog
● Very crucial while performing indexing, search, update,
and delete operations against the documents in it
● One can define as many indexes in one single cluster
Terminologies of Elastic Search
26
Document
● It is the most basic unit of information which can be
indexed
● It is expressed in json (key:value) pair.
‘{“user”:”nullcon”}’
● Every Document gets associated with a type and a
unique id.
Terminologies of Elastic Search
27
Shard
● Every index can be split into multiple shards to
be able to distribute data.
● The shard is the atomic part of an index, which
can be distributed over the cluster if you add
more nodes.
Terminologies of Elastic Search
28
29
30
A terminology comparison
Relational database Elasticsearch
Database Index
Table Type
Row Document
Column Field
Schema Mapping
Index Everything is indexed
SQL Query DSL
SELECT * FROm tb … GET http://
UPDATE tb SET … PUT http://
31
Playing with Elasticsearch
REST API:
http://host:port/[index]/[type]/[_action/
id]
HTTP Methods: GET, POST,PUT,DELETE
32
Playing with Elasticsearch
• Search
– curl –XGET http://localhost:9200/my_index/test/_search
– curl –XGET http://localhost:9200/my_index/_search
– curl –XPUT http://localhost:9200/_search
• Meta Data
– curl –XPUT http://localhost:9200/my_index/_status
• Documents:
– curl –XPUT http://localhost:9200/my_index/test/1
– curl –XGET http://localhost:9200/my_index/test/1
– curl –XDELETE http://localhost:9200/my_index/test/1
33
Example: Index
Curl –XPUT http://localhost:9200/my_index/test/1 -d
‘{
"name": "joeywen",
"value": 100
}’
34
Example: Search
Curl –XGET http://localhost:9200/my_index/_search –d
‘{
“query”: {
“match_all”: {}
}
}’
Total number of docs
Relevance
Search time
Max score
35
Creating, indexing, or deleting a single document
36
Plugins-Kopf
37
Plugins-head
38
Web
39
40
1 de 40

Recomendados

Deep Dive Into Elasticsearch por
Deep Dive Into ElasticsearchDeep Dive Into Elasticsearch
Deep Dive Into ElasticsearchKnoldus Inc.
16.3K vistas27 diapositivas
Elastic search overview por
Elastic search overviewElastic search overview
Elastic search overviewABC Talks
8.6K vistas37 diapositivas
Introduction to elasticsearch por
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearchpmanvi
6.7K vistas26 diapositivas
Elasticsearch por
ElasticsearchElasticsearch
ElasticsearchDivij Sehgal
546 vistas23 diapositivas
Elasticsearch por
ElasticsearchElasticsearch
ElasticsearchShagun Rathore
718 vistas39 diapositivas
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train... por
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...Edureka!
1.6K vistas61 diapositivas

Más contenido relacionado

La actualidad más candente

ElasticSearch Basic Introduction por
ElasticSearch Basic IntroductionElasticSearch Basic Introduction
ElasticSearch Basic IntroductionMayur Rathod
25.6K vistas34 diapositivas
Elasticsearch presentation 1 por
Elasticsearch presentation 1Elasticsearch presentation 1
Elasticsearch presentation 1Maruf Hassan
4.6K vistas14 diapositivas
Elasticsearch Introduction por
Elasticsearch IntroductionElasticsearch Introduction
Elasticsearch IntroductionRoopendra Vishwakarma
3K vistas20 diapositivas
What I learnt: Elastic search & Kibana : introduction, installtion & configur... por
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...Rahul K Chauhan
1.1K vistas17 diapositivas
Elasticsearch for beginners por
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginnersNeil Baker
15.5K vistas38 diapositivas
Elasticsearch From the Bottom Up por
Elasticsearch From the Bottom UpElasticsearch From the Bottom Up
Elasticsearch From the Bottom Upfoundsearch
6K vistas82 diapositivas

La actualidad más candente(20)

ElasticSearch Basic Introduction por Mayur Rathod
ElasticSearch Basic IntroductionElasticSearch Basic Introduction
ElasticSearch Basic Introduction
Mayur Rathod25.6K vistas
Elasticsearch presentation 1 por Maruf Hassan
Elasticsearch presentation 1Elasticsearch presentation 1
Elasticsearch presentation 1
Maruf Hassan4.6K vistas
What I learnt: Elastic search & Kibana : introduction, installtion & configur... por Rahul K Chauhan
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...
Rahul K Chauhan1.1K vistas
Elasticsearch for beginners por Neil Baker
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginners
Neil Baker15.5K vistas
Elasticsearch From the Bottom Up por foundsearch
Elasticsearch From the Bottom UpElasticsearch From the Bottom Up
Elasticsearch From the Bottom Up
foundsearch6K vistas
Introduction to Elasticsearch por Ruslan Zavacky
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Ruslan Zavacky7.6K vistas
Elasticsearch for Data Analytics por Felipe
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data Analytics
Felipe 3.2K vistas
Introduction to Elasticsearch with basics of Lucene por Rahul Jain
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of Lucene
Rahul Jain13.2K vistas
Elastic Stack Introduction por Vikram Shinde
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
Vikram Shinde7.9K vistas
Centralized log-management-with-elastic-stack por Rich Lee
Centralized log-management-with-elastic-stackCentralized log-management-with-elastic-stack
Centralized log-management-with-elastic-stack
Rich Lee480 vistas
quick intro to elastic search por medcl
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
medcl16.9K vistas
Elasticsearch V/s Relational Database por Richa Budhraja
Elasticsearch V/s Relational DatabaseElasticsearch V/s Relational Database
Elasticsearch V/s Relational Database
Richa Budhraja11.4K vistas
ElasticSearch at berlinbuzzwords 2010 por Elasticsearch
ElasticSearch at berlinbuzzwords 2010ElasticSearch at berlinbuzzwords 2010
ElasticSearch at berlinbuzzwords 2010
Elasticsearch8.8K vistas
검색엔진이 데이터를 다루는 법 김종민 por 종민 김
검색엔진이 데이터를 다루는 법 김종민검색엔진이 데이터를 다루는 법 김종민
검색엔진이 데이터를 다루는 법 김종민
종민 김16.1K vistas
Elastic Search por Navule Rao
Elastic SearchElastic Search
Elastic Search
Navule Rao964 vistas

Similar a Intro to elasticsearch

Wanna search? Piece of cake! por
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!Alex Kursov
1.3K vistas16 diapositivas
Roaring with elastic search sangam2018 por
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Vinay Kumar
500 vistas50 diapositivas
Searching and Analyzing Qualitative Data on Personal Computer por
Searching and Analyzing Qualitative Data on Personal ComputerSearching and Analyzing Qualitative Data on Personal Computer
Searching and Analyzing Qualitative Data on Personal ComputerIOSR Journals
525 vistas5 diapositivas
Search Me: Using Lucene.Net por
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Netgramana
1.1K vistas25 diapositivas
Elastic search por
Elastic searchElastic search
Elastic searchBinit Pathak
259 vistas35 diapositivas
Elasticsearch por
ElasticsearchElasticsearch
ElasticsearchOto Brglez
2.5K vistas14 diapositivas

Similar a Intro to elasticsearch(20)

Wanna search? Piece of cake! por Alex Kursov
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!
Alex Kursov1.3K vistas
Roaring with elastic search sangam2018 por Vinay Kumar
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018
Vinay Kumar500 vistas
Searching and Analyzing Qualitative Data on Personal Computer por IOSR Journals
Searching and Analyzing Qualitative Data on Personal ComputerSearching and Analyzing Qualitative Data on Personal Computer
Searching and Analyzing Qualitative Data on Personal Computer
IOSR Journals525 vistas
Search Me: Using Lucene.Net por gramana
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
gramana1.1K vistas
Elasticsearch por Oto Brglez
ElasticsearchElasticsearch
Elasticsearch
Oto Brglez2.5K vistas
ElasticSearch Getting Started por Onuralp Taner
ElasticSearch Getting StartedElasticSearch Getting Started
ElasticSearch Getting Started
Onuralp Taner2.5K vistas
Elasticsearch, a distributed search engine with real-time analytics por Tiziano Fagni
Elasticsearch, a distributed search engine with real-time analyticsElasticsearch, a distributed search engine with real-time analytics
Elasticsearch, a distributed search engine with real-time analytics
Tiziano Fagni822 vistas
CS6007 information retrieval - 5 units notes por Anandh Arumugakan
CS6007   information retrieval - 5 units notesCS6007   information retrieval - 5 units notes
CS6007 information retrieval - 5 units notes
Anandh Arumugakan7.6K vistas
A Review of Elastic Search: Performance Metrics and challenges por rahulmonikasharma
A Review of Elastic Search: Performance Metrics and challengesA Review of Elastic Search: Performance Metrics and challenges
A Review of Elastic Search: Performance Metrics and challenges
rahulmonikasharma353 vistas
Elasticsearch as a search alternative to a relational database por Kristijan Duvnjak
Elasticsearch as a search alternative to a relational databaseElasticsearch as a search alternative to a relational database
Elasticsearch as a search alternative to a relational database
Kristijan Duvnjak11.6K vistas
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی por Ehsan Asgarian
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیDeep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Ehsan Asgarian344 vistas
Intro to Elasticsearch por Clifford James
Intro to ElasticsearchIntro to Elasticsearch
Intro to Elasticsearch
Clifford James10.7K vistas
Using elasticsearch with rails por Tom Z Zeng
Using elasticsearch with railsUsing elasticsearch with rails
Using elasticsearch with rails
Tom Z Zeng8.2K vistas
Elasticsearch Architechture por Anurag Sharma
Elasticsearch ArchitechtureElasticsearch Architechture
Elasticsearch Architechture
Anurag Sharma73 vistas

Último

What is Unit Testing por
What is Unit TestingWhat is Unit Testing
What is Unit TestingSadaaki Emura
23 vistas25 diapositivas
Generative AI Models & Their Applications por
Generative AI Models & Their ApplicationsGenerative AI Models & Their Applications
Generative AI Models & Their ApplicationsSN
8 vistas1 diapositiva
START Newsletter 3 por
START Newsletter 3START Newsletter 3
START Newsletter 3Start Project
5 vistas25 diapositivas
CHEMICAL KINETICS.pdf por
CHEMICAL KINETICS.pdfCHEMICAL KINETICS.pdf
CHEMICAL KINETICS.pdfAguedaGutirrez
12 vistas337 diapositivas
MSA Website Slideshow (16).pdf por
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdfmsaucla
68 vistas8 diapositivas
Proposal Presentation.pptx por
Proposal Presentation.pptxProposal Presentation.pptx
Proposal Presentation.pptxkeytonallamon
29 vistas36 diapositivas

Último(20)

Generative AI Models & Their Applications por SN
Generative AI Models & Their ApplicationsGenerative AI Models & Their Applications
Generative AI Models & Their Applications
SN8 vistas
MSA Website Slideshow (16).pdf por msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla68 vistas
Proposal Presentation.pptx por keytonallamon
Proposal Presentation.pptxProposal Presentation.pptx
Proposal Presentation.pptx
keytonallamon29 vistas
GDSC Mikroskil Members Onboarding 2023.pdf por gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil51 vistas
fakenews_DBDA_Mar23.pptx por deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra814 vistas
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,... por AakashShakya12
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
AakashShakya1272 vistas
zincalume water storage tank design.pdf por 3D LABS
zincalume water storage tank design.pdfzincalume water storage tank design.pdf
zincalume water storage tank design.pdf
3D LABS5 vistas
DevOps to DevSecOps: Enhancing Software Security Throughout The Development L... por Anowar Hossain
DevOps to DevSecOps: Enhancing Software Security Throughout The Development L...DevOps to DevSecOps: Enhancing Software Security Throughout The Development L...
DevOps to DevSecOps: Enhancing Software Security Throughout The Development L...
Anowar Hossain13 vistas
SPICE PARK DEC2023 (6,625 SPICE Models) por Tsuyoshi Horigome
SPICE PARK DEC2023 (6,625 SPICE Models) SPICE PARK DEC2023 (6,625 SPICE Models)
SPICE PARK DEC2023 (6,625 SPICE Models)
Tsuyoshi Horigome24 vistas
Investigation of Physicochemical Changes of Soft Clay around Deep Geopolymer ... por AltinKaradagli
Investigation of Physicochemical Changes of Soft Clay around Deep Geopolymer ...Investigation of Physicochemical Changes of Soft Clay around Deep Geopolymer ...
Investigation of Physicochemical Changes of Soft Clay around Deep Geopolymer ...
AltinKaradagli9 vistas
NEW SUPPLIERS SUPPLIES (copie).pdf por georgesradjou
NEW SUPPLIERS SUPPLIES (copie).pdfNEW SUPPLIERS SUPPLIES (copie).pdf
NEW SUPPLIERS SUPPLIES (copie).pdf
georgesradjou15 vistas

Intro to elasticsearch

  • 1. Your Data, Your Search ! 问志光 2016-06-27 1
  • 2. Outline  Information retrieval  Indexing & Searching  Elasticsearch 2
  • 3. Information retrieval  Information Retrieval(IR) is finding material(usually documents) of an unstructured nature(usually text) that statisfies an information need from within large collections(usually stored on computers).  Search Engine is a software system that is designed to search for information. It’s a kind of implementation of IR. 3
  • 4. What is search engine?  A search engine is  An index engine for documents  A search engine on indexes  A search engine is more powerful to do searches: It’s designed for it ! 4
  • 6. 6
  • 7. 7
  • 8. 8
  • 9. Problems ??  How to store the data ?  How to index the data ?  How to search the data ? 9
  • 10. How to store the data ? INVERTED LIST 10
  • 11. How to the data ? INDEX 11
  • 12. the follow two files  File1: Students should be allowed to go out with their friends, but not allowed to drink beer.  File2: My friend Jerry went to school to see his students but found them drunk which is not allowed. 12
  • 13. Step 1: Tokenzier  Split doc into words  Remove the punctuation  Remove stop word (the, a, this, that etc.) “Students”,“allowed”,“go”,“their”, “friends”,“allowed”,“drink”,“beer”,“My”, “friend”,“Jerry”,“went”,“school”,“see”, “his”,“students”,“found”,“them”,“drunk”, “allowed” 13
  • 14. Step2: Linguistic Processor  Lowercase  Stemming, cars -> car, etc.  Lemmatizatio, drove -> drive, etc. “student”,“allow”,“go”,“their”,“friend” ,“allow”,“drink”,“beer”,“my”,“friend” ,“jerry”,“go”,“school”,“see”,“his”, “student”,“find”,“them”,“drink”,“allow” Term 14
  • 15. Step3: Index Term Document ID student 1 allow 1 go 1 their 1 friend 1 allow 1 … …  Dict  Sort  Posting list 15
  • 16. 16
  • 17. How to the data ? SEARCH 17
  • 18. Step1: User search query • Suppose you have the follow query: lucene AND learned NOT hadoop 18
  • 19. Step2: Lexical & Syntax Analysis  Identify words and keywords  Words: lucene, learned, hadoop  Keywords: AND, NOT  Building a syntax tree lucene learned hadoopAND Not 19
  • 20. Step3: Search  Search in the Inverted List  Sort, Conjunction, Disconjunction  Scorer 20
  • 21. full text search RESTful API real time, Search and analytics engine open source high availability schema free JSON over HTTP Lucene based distributed RESTful API ElasticSearch 21
  • 22. Elastic Search  Distributed and Highly Available Search Engine.  Each index is fully sharded with a configurable number of shards.  Each shard can have one or more replicas.  Read / Search operations performed on either one of the 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.  All APIs perform automatic node operation rerouting.  (Near) Real Time Search.  Reliable, Asynchronous Write Behind for long term persistency.  Built on top of Lucene  Each 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 the Apache License, version 2 ("ALv2") 22
  • 23. Terminologies of Elastic Search  Cluster  Node  Index  Shard 23
  • 24. Cluster ● A cluster is a collection of one or more nodes (servers) that together holds your entire data and provides federated indexing and search capabilities across all nodes ● A cluster is identified by a unique name which by default is "elasticsearch" Terminologies of Elastic Search 24
  • 25. Node ● It is an elasticsearch instance (a java process) ● A node is created when a elasticsearch instance is started ● A random Marvel Charater name is allocated by default Terminologies of Elastic Search 25
  • 26. Index ● An index is a collection of documents that have somewhat similar characteristics. eg:customer data, product catalog ● Very crucial while performing indexing, search, update, and delete operations against the documents in it ● One can define as many indexes in one single cluster Terminologies of Elastic Search 26
  • 27. Document ● It is the most basic unit of information which can be indexed ● It is expressed in json (key:value) pair. ‘{“user”:”nullcon”}’ ● Every Document gets associated with a type and a unique id. Terminologies of Elastic Search 27
  • 28. Shard ● Every index can be split into multiple shards to be able to distribute data. ● The shard is the atomic part of an index, which can be distributed over the cluster if you add more nodes. Terminologies of Elastic Search 28
  • 29. 29
  • 30. 30
  • 31. A terminology comparison Relational database Elasticsearch Database Index Table Type Row Document Column Field Schema Mapping Index Everything is indexed SQL Query DSL SELECT * FROm tb … GET http:// UPDATE tb SET … PUT http:// 31
  • 32. Playing with Elasticsearch REST API: http://host:port/[index]/[type]/[_action/ id] HTTP Methods: GET, POST,PUT,DELETE 32
  • 33. Playing with Elasticsearch • Search – curl –XGET http://localhost:9200/my_index/test/_search – curl –XGET http://localhost:9200/my_index/_search – curl –XPUT http://localhost:9200/_search • Meta Data – curl –XPUT http://localhost:9200/my_index/_status • Documents: – curl –XPUT http://localhost:9200/my_index/test/1 – curl –XGET http://localhost:9200/my_index/test/1 – curl –XDELETE http://localhost:9200/my_index/test/1 33
  • 34. Example: Index Curl –XPUT http://localhost:9200/my_index/test/1 -d ‘{ "name": "joeywen", "value": 100 }’ 34
  • 35. Example: Search Curl –XGET http://localhost:9200/my_index/_search –d ‘{ “query”: { “match_all”: {} } }’ Total number of docs Relevance Search time Max score 35
  • 36. Creating, indexing, or deleting a single document 36
  • 40. 40