Download - DrupalANDElasticsearch
![Page 1: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/1.jpg)
ELASTICSEARCH
The “new school” search engine
![Page 2: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/2.jpg)
About me - @nignatov
• Founder at NodeSpark
• Using PHP since 2006
• Using Drupal since 2009
• Elasticsearch Connector maintainer
• Love to experiment with new technologies
![Page 3: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/3.jpg)
After the session you should know:
• What is Elasticsearch • How Elasticsearch is working in general • What you can do with Drupal and
Elasticsearch. • Roadmap of the project and some
brain food.
![Page 4: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/4.jpg)
The main goal
GET INLOVE! GET INVOLVED!
![Page 5: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/5.jpg)
Shay Banon • http://thedudeabides.com/ • https://github.com/kimchy • https://twitter.com/kimchy/
Who made Elasticsearch?
![Page 6: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/6.jpg)
Why “new school”?
![Page 7: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/7.jpg)
Who else is using it?
![Page 8: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/8.jpg)
Who is using it?
![Page 9: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/9.jpg)
Visit Elastic{ON} to get more
![Page 10: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/10.jpg)
• Distributed out of the box - Incredible easy to make cluster, just start new node!
• High availability
• Real time index/search • REST API with JSON • Build on top of Apache Lucene and Open Source
http://github.com/elasticsearch/elasticsearch • Schema free • Document oriented
What is Elasticsearch?
![Page 11: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/11.jpg)
Vertical and horizontal scaling
S01
S01
S01
S01 S02 S03 S04+
![Page 12: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/12.jpg)
The feature I really love
![Page 13: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/13.jpg)
How to install it?
![Page 14: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/14.jpg)
How to install it?
![Page 15: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/15.jpg)
How to install it?
![Page 17: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/17.jpg)
Some terms before we start
RELATIONAL DB ELASTICSEARCH
Database Index
Tables Types
Rows Documents
Column Field
![Page 18: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/18.jpg)
Indices API – Create index
index
![Page 19: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/19.jpg)
How distributed works?
Node2
Node 1
PUT /twitter index: number_of_shards:3 number_of_replicas:1
1P 2P
3P
2P 1R
3R
2R
Node3
3P 1R3R
2R3R
![Page 20: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/20.jpg)
Node2
Multiple indices
Node 1
1P 2P2R
Node3
3P 1R3R
PUT /news?pretty index: number_of_shards:3 number_of_replicas:1
1NP 2NR 2NP 3NR 3NP 1NR
Node2
Node 1
1P 2P2R
Node3
3P 1R3R
PUT /news?pretty index: number_of_shards:3 number_of_replicas:1
1NP 2NR 2NP 3NR 3NP 1NR
![Page 21: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/21.jpg)
index type id
Index API - Request
![Page 22: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/22.jpg)
Node2
Node 1
PUT /twitter/tweet/1{….}
1P 2P2R
Node3
3P 1R3R
Distributed indexing
![Page 23: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/23.jpg)
Index API - Response
![Page 24: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/24.jpg)
Get API - Req and Res
![Page 25: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/25.jpg)
Node2
Node 1
GET /twitter/tweet/1
1P 2P2R
Node3
3P 1R3R
Distributed GET
![Page 26: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/26.jpg)
PUT the document again or…
Update document
![Page 27: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/27.jpg)
Delete document
![Page 28: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/28.jpg)
Search API - Request
![Page 29: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/29.jpg)
Node2
Node 1
GET /twitter/_search?q=vienna
1P 2P2R
Node3
3P 1R3R
Distributed Search
![Page 30: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/30.jpg)
Delete index
![Page 31: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/31.jpg)
How full text search works?
Search for: “Drupal Camp Vienna has been great!”
![Page 32: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/32.jpg)
1. Separate the string into words 2. Create sorted unique list 3. Specify which documents contains this terms
TERMS DOC 1 DOC 2 DOC 3
drupal X X
camp X X
vienna X X
Has X X
been X X
great X
Inverted index
![Page 33: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/33.jpg)
Tokenization + Normalizationor tokenizer + token filters (>=0)
Analysis
![Page 34: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/34.jpg)
DSL Query language Aggregation API (Facets on steroids) AliasingPercolatingGEO searching Attachments many more
More features
![Page 35: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/35.jpg)
Elasticsearch and Drupal
![Page 36: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/36.jpg)
Drupal 7 EcoSystem
1. Elasticsearch Connector 2. EC Search API 3. EC Views 4. EC Statistics 5. EC Watchdog 6. EC Sequence 7. EC Devel
![Page 37: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/37.jpg)
Drupal 7 Watchdog
![Page 38: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/38.jpg)
Drupal 7 Search API
![Page 39: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/39.jpg)
Drupal 8… still patchable!
![Page 40: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/40.jpg)
Roadmap
• Drupal Abstraction Layer • Vagrant, Travis-CI, and automated
tests • Search API integration • Stand alone views module • Statistics / Personalization • Automatic the “Easy install” library
packing.
![Page 41: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/41.jpg)
Brainstorm – Content hubSite X
Site Y
Site Z
Content Hub
Feed Site
![Page 42: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/42.jpg)
Brainstorm – Headless
NodeJS
Data Warehouse
Drupal CMS
Frontend
![Page 43: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/43.jpg)
Brainstorm – SLA HubSite 01
Site 02
Site 03
Site 04
Site 05
Support Department Monitoring
![Page 44: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/44.jpg)
Brainstorm - PerformanceWeb 01
Web 02
Web 03
Web 04
Web 05
![Page 45: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/45.jpg)
Special thanks!
![Page 46: DrupalANDElasticsearch](https://reader031.vdocuments.us/reader031/viewer/2022030309/58f166291a28ab2f7d8b460d/html5/thumbnails/46.jpg)
Thank you!
Questions ?