ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk,...
-
Upload
marcelo-musgrove -
Category
Documents
-
view
231 -
download
0
Transcript of ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk,...
![Page 1: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/1.jpg)
ElasticSearchAmaze business, make your devs happy
curl -XGET http://localhost:9200/
Sebastian Belczyk, @sbelczyk
25/03/2013 #EllerslieDNUG
![Page 2: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/2.jpg)
ElasticSearch
You know for search
Real time search and analytics engine
No-SQL Document database
Use Lucene for indexing
It’s horizontally and verticaly scalable
Automatic cluster formation
Fault tolerant
Zero config (at the begining)
Nice RESTfull API
![Page 3: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/3.jpg)
ElasticSearch
SQL DB
Index data
Application
Search and retrive
![Page 4: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/4.jpg)
Data storege
ElasticSearch stores documents in indices
Each index can contain multiple types of documents
Index is splited into multiple shards
Each shard may be stored on a different node
![Page 5: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/5.jpg)
Shrads allocation
Node 1P1
P2
P3
Node 1P1
P2
P3
Node 2R1
R2
R3
![Page 6: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/6.jpg)
Shrads allocation
Node 1P2
P3
Node 2R1
R3
Node 3P1
R2
Node 1R1
P2
P3
Node 2R1
R2
R3
Node 3P1
R2
R3
![Page 7: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/7.jpg)
Quering Search
Words and n-grams
Geo location
Date and time
Value ranges
Fuzzy maching
Facets and Aggregations
Distinct values for given field with document count
Statistics for numeric fileds (average, min, max)
Time series
Suggestions
Autocomplete
Did you mean
More like
![Page 8: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/8.jpg)
Query example
![Page 9: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/9.jpg)
{ "query": { "filtered": { "query": { "match": { "name": { "query": "amd" } } }, "filter": { "bool": { "must": [ { "term": { "category": "CPUs" } }, { "range": { "price": { "from": 200, "to": 300 } } }, { "term": { "cores": "4" } } ] } } } }}
![Page 10: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/10.jpg)
.net Clients
NEST
PlainElastic.Net
ElasticSearch.NET
![Page 11: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/11.jpg)
![Page 12: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/12.jpg)
Scoring
Scoring functions
Boost queries
Boost filters
Decay functions
Custom score functions
![Page 13: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/13.jpg)
Indexing
ClinetIndex
• Stored in transaction log
Flush
• Indexed in ES
Refresh
• Available for search
![Page 14: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/14.jpg)
Testing
![Page 15: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/15.jpg)
Deployment
Requirements:
Java Server JRE
JAVA_HOME variable pointing to JRE (not bin)
Steps
From ElasticSearch dir run bin/service install
Change service start mode to automatic and run service
![Page 16: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/16.jpg)
Tools
Sense
Kibana
Logstash
Marvel
Rivers
![Page 17: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/17.jpg)
Tools
![Page 18: ElasticSearch Amaze business, make your devs happy curl -XGET //localhost:9200/ Sebastian Belczyk, @sbelczyk25/03/2013 #EllerslieDNUG.](https://reader030.fdocuments.in/reader030/viewer/2022012905/551776aa55034645368b4e52/html5/thumbnails/18.jpg)
Learning materials
http://goo.gl/JUNWRZ
Videos
Articles
Books
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/index.html