Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator
-
date post
21-Oct-2014 -
Category
Technology
-
view
357 -
download
0
description
Transcript of Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator
![Page 1: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/1.jpg)
ElasticsearchScalable Full-Text Search Engine
Thursday, February 27, 14
![Page 2: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/2.jpg)
Goals for this talk
Thursday, February 27, 14
![Page 3: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/3.jpg)
Outline
• What’s full text search and why do we use it?
• What can you do with Elasticsearch?
• Why is Elasticsearch different?
• DEMO TIME!
Thursday, February 27, 14
![Page 4: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/4.jpg)
Text Search do I really need to explain it?
Thursday, February 27, 14
![Page 5: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/5.jpg)
%LIKE%
• In the beginning there was:
SELECT * FROM tweets WHERE content LIKE ‘%zuckerberg%’
Thursday, February 27, 14
![Page 6: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/6.jpg)
But that’s not what you usually search for!
• You want:
Search by author
Search by time
Search by sentiment
Search by location
Search by everything!
Thursday, February 27, 14
![Page 7: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/7.jpg)
That’s a lot of metadata!
• You can’t search through all that on the fly if you want realtime results
• You need to index it first!
Thursday, February 27, 14
![Page 8: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/8.jpg)
Inverted Index
• Some documents:1: ‘Mark Zuckerberg sells Facebook’ [Monday]2: ‘Facebook buys WhatsApp’ [Tuesday]3: ‘Mark’s Facebook buys Instagram’[Monday]
• Inverted index for them:Facebook: { 1, 2, 3}
Mark: {1, 3}Instagram: {2}WhatsApp: {2}[Monday]: {1, 3}
Thursday, February 27, 14
![Page 9: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/9.jpg)
Ok, now that we have data, we also want some numbers behind it!
• In our previous example:
• Facebook is mentioned 3 times
• There are 2 posts on [Monday]
• The most frequent words are Facebook and Mark
Thursday, February 27, 14
![Page 10: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/10.jpg)
All 3 put together
Elasticsearch
=
Search(Content & Metadata) + Analytics
(oversimplified)
Thursday, February 27, 14
![Page 11: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/11.jpg)
Let’s look at some search features of
Elasticsearch
Thursday, February 27, 14
![Page 12: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/12.jpg)
Features: Complex Queries• Boolean Operators:
(apple OR pumpkin) AND pie
• Wildcards:
app*: apple, apples, appliance
appl?: apple, apply
• Fuzzy:
back~: back, pack, black, bank
• Ranged:
Thursday, February 27, 14
![Page 13: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/13.jpg)
Features: Complex Queries
• Attribute filtering:
apple AND pie AND location:california
• Range filtering: apple AND published:[1393100055 TO 1393427055]
Thursday, February 27, 14
![Page 14: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/14.jpg)
Features:Geo Queries
Bounding Box Queries Distance Range Queries
Thursday, February 27, 14
![Page 15: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/15.jpg)
Feature: built in analytics
Thursday, February 27, 14
![Page 16: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/16.jpg)
Feature: Built in tagcloud
Thursday, February 27, 14
![Page 17: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/17.jpg)
What’s special about Elasticsearch?
Thursday, February 27, 14
![Page 18: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/18.jpg)
Distributed
• Clustering data into multiple servers is easy and abstracted away from the developer
Thursday, February 27, 14
![Page 19: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/19.jpg)
Performance/Scalability
• Add and take nodes on the fly without ever stopping the search service
Thursday, February 27, 14
![Page 20: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/20.jpg)
Performance/Scalability
• Can scale independently both indexing and searching
Thursday, February 27, 14
![Page 21: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/21.jpg)
Performance/Scalability
• With few nodes you can do complex queries on billions of documents
• 3 nodes: 20 mil documents with 2 replicas each
Thursday, February 27, 14
![Page 22: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/22.jpg)
Easy to back up
• Elasticsearch has a built in backup solution so that you don’t have to worry about implementing one
Thursday, February 27, 14
![Page 23: Intro to Elaticsearch - Elasticsearch Bucharest Group @ Softbinator](https://reader033.fdocuments.net/reader033/viewer/2022051207/54469836afaf9f61178b46e1/html5/thumbnails/23.jpg)
Demo time!
Thursday, February 27, 14