11
Introduction to Search Engines with Lucene and ElasticSearch Tomer Gabel, newBrandAnalytics

Intro to search engines with Lucene and ElasticSearch

Embed Size (px)

DESCRIPTION

A talk given at the JJTV Tools Night #3 on September 5, 2012: http://www.meetup.com/jjtv-il/events/77834332/

Citation preview

Page 1: Intro to search engines with Lucene and ElasticSearch

Introduction to Search Engineswith Lucene and ElasticSearch

Tomer Gabel, newBrandAnalytics

Page 2: Intro to search engines with Lucene and ElasticSearch

Overture

A search engine is…

a document store

Page 3: Intro to search engines with Lucene and ElasticSearch

Overture

Step 1

Tokenization

Page 4: Intro to search engines with Lucene and ElasticSearch

Overture

Step 2

Filtering

Page 5: Intro to search engines with Lucene and ElasticSearch

Overture

Step 3

Build reverse index

Page 6: Intro to search engines with Lucene and ElasticSearch

Overture

• Term query– Maps a term to its

document– Scoring is based

on:• Number of hits per

document (TF)• How “strong” a

match is (IDF)

Page 7: Intro to search engines with Lucene and ElasticSearch

Overture

• Boolean query–Multiple clauses–Each match can:

• Include document (MUST)

• Affect score (SHOULD)

• Exclude document (MUST_NOT)

Page 8: Intro to search engines with Lucene and ElasticSearch

Overture

• Phrase query–All terms must

appear near each other

–Slop is the maximum token “edit distance”

–Closer match = higher score

Page 9: Intro to search engines with Lucene and ElasticSearch

It’s demo time.

Recitativo

Page 10: Intro to search engines with Lucene and ElasticSearch

It’s demo time.

Crescendo

Page 11: Intro to search engines with Lucene and ElasticSearch

Content: Apache Lucene: http://lucene.apache.org/ Elastic Search: http://www.elasticsearch.org/ Code samples:https

://github.com/holograph/examples/tree/master/lucene-demo

PowerPoint template by SmileTemplates.com

Thank you for your time! [email protected] http://www.tomergabel.com

Afterword