31
Hi

Drupal and Elasticsearch

Embed Size (px)

DESCRIPTION

Presentation of the Elasticsearch and Drupal integration - the Elasticsearch Connector module.

Citation preview

Page 1: Drupal and Elasticsearch

Hi

Page 2: Drupal and Elasticsearch

What we are going to talk?• Elasticsearch technology - http://www.elasticsearch.org

• What is Elasticsearch?

• How it works?

• Elasticsearch and Drupal – Demohttp://www.drupal.org/project/elasticsearch_connector

Page 3: Drupal and Elasticsearch

Who made Elasticsearch?

• Shay Banon

• http://www.kimchy.org/

• https://github.com/kimchy

• https://twitter.com/kimchy/

Page 4: Drupal and Elasticsearch

Who is using it?

Page 5: Drupal and Elasticsearch

Why they use it?

• 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 Sourcehttp://github.com/elasticsearch/elasticsearch

• Schema free

• Document oriented

Page 6: Drupal and Elasticsearch

How to install it?

Page 7: Drupal and Elasticsearch

How to install it?

Page 8: Drupal and Elasticsearch

How to install it?

Page 9: Drupal and Elasticsearch

If using Chrome?

Sense

Page 10: Drupal and Elasticsearch

Indices API – Create index

index

Page 11: Drupal and Elasticsearch

Node2

How distributed works?

Node1

PUT /twitter index: number_of_shards:3 number_of_replicas:1

1P 2P

3P

2P 1R

3R

2R

Node3

3P 1R

3R

2R

3R

Page 12: Drupal and Elasticsearch

Node2

Multiple indices

Node1

1P 2P2R

Node3

3P 1R

3R

PUT /news?pretty index: number_of_shards:3 number_of_replicas:1

1NP

2NR

2NP

3NR

3NP

1NR

Page 13: Drupal and Elasticsearch

Index API - Request

index type id

Page 14: Drupal and Elasticsearch

Node2

Distributed indexing

Node1

PUT /twitter/tweet/1{….}

1P 2P2R

Node3

3P 1R

3R

Page 15: Drupal and Elasticsearch

Index API - Response

Page 16: Drupal and Elasticsearch

Get API - Req and Res

Page 17: Drupal and Elasticsearch

Node2

Distributed GET

Node1

GET /twitter/tweet/1

1P 2P2R

Node3

3P 1R

3R

Page 18: Drupal and Elasticsearch

Search API - Request

Page 19: Drupal and Elasticsearch

Node2

Distributed search

Node1

GET /twitter/_search?q=kimchy

1P 2P2R

Node3

3P 1R

3R

Page 20: Drupal and Elasticsearch

Update document

PUT the document again or…

Page 21: Drupal and Elasticsearch

Delete document

Page 22: Drupal and Elasticsearch

Delete index

Page 23: Drupal and Elasticsearch

How full text search works?

Search for: “berlin tweet”

Page 24: Drupal and Elasticsearch

Inverted index

1. Separate the string into words2. Create sorted unique list3. Specify which documents contains this terms

TERMS DOC 1 DOC 2 DOC 3

berlin X

looking X

tweet X X

presentations

X

elastic X X

trying X

Page 25: Drupal and Elasticsearch

Analysis

Tokenization + Normalizationor

tokenizer + token filters (>=0)

Page 26: Drupal and Elasticsearch

More features

DSL Query languageFacets/Aggregation APIAliasingPercolatingGEO searchingAttachmentss.o.

Page 27: Drupal and Elasticsearch

Video resources

http://www.youtube.com/watch?v=fEsmydn747c

http://www.youtube.com/watch?v=lpZ6ZajygDY

http://www.youtube.com/watch?v=52G5ZzE0XpY

http://www.elasticsearch.org/videos/

Page 28: Drupal and Elasticsearch

Elasticsearch and Drupal

Page 29: Drupal and Elasticsearch

Drupal Demo time!

Page 30: Drupal and Elasticsearch

Roadmap

Page 31: Drupal and Elasticsearch

Thank you!

Questions?