SlideShare a Scribd company logo
ELASTICSEARCH
Why we need SEARCH ENGINE!!!
 Work Life without Google ?
 Amazon,Flipkart,Facebook,Twitter,GitHub,
StackOverflow,Zomato don’t have a search capability ?
You know, for search …
 Lot of DATA around us but less INFORMATION.
 Make our life easier.
 Find relevant stuff.
 Find it faster.
 For research,to shop,for entertainment etc
Elasticsearch !!!
 Real-time(near real time) distributed search & analytics engine
 Runs on top of Apache Lucene, written in Java,supports REST API
 Search Engine Software
 Private search engine service (like a Bing or a Google) but with
say, private, sensitive, or confidential data/documents that you
don’t want on the public web
 Developed by Shay Banon
ElasticSearch Clients
 Git Hub
 StackOverflow
 Wikipedia
 The Guardian
 SoundCloud
 McGraw-Hill
Relational db vs Elasticsearch
ElasticSearch Concepts
 Document : JSON document stored in ES. Like row in table in
Relational DB
 Id : Uniquely identifies a document
 Field : key-value pairs. Like column in Relational DB
- Simple value like string ,integer, date
- Array or an object
 Type : Like a table in realational DB.Has list of fields.
ElasticSearch Concepts
 Near RealTime(nrt) : Slight time lag between index a document
and being searchable.
 Shard : Low level worker unit,Single lucene instance
- Primary Shard (Physically stored document)
- Replica Shard (Copy of primary shard)
 Index : Like Database in relational db,Logical namespace which
maps to primary and replica shard
 Node : Running instance of elasticsearch
ElasticSearch Concepts
 Cluster : Collection of one or more nodes
- Facilitates indexing
- Search capabilities across nodes
Inside a Node
Inside a cluster
ElasticSearch Getting Started …
 Recent version of Java
 elasticsearch.org/download
 Latest version of any browser
 Marvel & Sense
 Marvel : monitoring and management tool
 Sense : interactive console
Talking to ElasticSearch
 RESTful api json over http
 A request to Elasticsearch consists of the same parts as
any HTTP request:
curl -X<VERB> '<PROTOCOL>://<HOST>/<PATH>' -d '<BODY>‘
curl -X<VERB> '<PROTOCOL>://<HOST>/<PATH>?<QUERY_STRING>'
Document Oriented
 Stores entire objects or documents. It not only stores them, but
also indexes the contents of each document in order to make them
searchable
 Elasticsearch uses JavaScript Object Notation, or JSON,
{
"email": "john@smith.com",
"first_name": "John",
"last_name": "Smith",
"info": {
"bio": "Eco-warrior and defender of the weak",
"age": 25,
"interests": [ "dolphins", "whales" ]
},
"join_date": "2014/05/01"
}
Create Index,Insert Data …
 Cluster : myelasticsearch
Node : The Dark Knight
Index : Megacorp
Type : Employee
 A request to Elasticsearch consists of the same parts as any HTTP request(Using Sense):
<VERB> '<PROTOCOL>://<HOST>/<INDEX>/<TYPE>/ID ' '<BODY>‘
<VERB> '<PROTOCOL>://<HOST>/<PATH><INDEX>/<TYPE>/ID /?<QUERY_STRING>'
 Create Index Example :
PUT localhost:9201/megacorp/employee/1
{
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests": [ "sports", "music" ]
}
What is Inverted Index?
 It allows very fast full text search.
 Doc_1 : The quick brown fox jumped over the lazy dog
Doc_2 : Quick brown foxes leap over lazy dogs in summer.
Inverted Index cont
 Search “quick brown”
 Both docs match here.
Doc_1 is more relevant.
Analysis and Analyzers
 Character filters A character filter could be used to strip out
HTML, or to convert &characters to the word and.
 Tokenizer Next, the string is tokenized into individual terms by
a tokenizer.
 Token filters Last, each term is passed through any token
filters in turn, which can change terms (for example,
lowercasing Quick), remove terms (for example, stopwords such
as a, and, the) or add terms (for example, synonyms
like jump and leap).
 Examples: Standard Analyzer,Simple Analyzer,Whitespace
analyzer,Language Analyzers etc
Inverted Index After Analysis
 Doc_1 : The quick brown fox jumped over the lazy dog
Doc_2 : Quick brown foxes leap over lazy dogs in summer.
 Quick can be lowercased to become quick.
 foxes can be stemmed--reduced to its root form—to
Become fox. Similarly, dogs could be stemmed to dog.
 jumped and leap are synonyms and can be indexed as just
the single term jump.
Retrieve Using Query String (SearchLite)…
 Retrieve Example :
GET localhost:9201/megacorp/employee/1
 Query String Search Example :
GET /megacorp/employee/_search?q=last_name:Smith
Retrieve Using DSL …
 Query DSL Search
Build complicated and robust queries.
 The domain-specific language (DSL) is specified using a JSON request body.
 Example :
GET /megacorp/employee/_search
{
"query": {
"match": {
"last_name": "Smith"
}
}
}
Querying
First part is the range
Filter.
Second Part is the
Match query
Full Text Search
 Elasticsearch can search within full-text fields and return the most relevant results
first. This concept of relevance is important to Elasticsearch, and is a concept that is
completely foreign to traditional relational databases, in which a record either
matches or it doesn’t.
Full Text Search Example
Phrase Search
 Matching Exact sequence of words or phrases
Highlight Searches
 Highlight snippets of text from each search result.
QUESTIONS ???
THANK YOU !!!

More Related Content

What's hot

Intro to Elasticsearch
Intro to ElasticsearchIntro to Elasticsearch
Intro to Elasticsearch
Clifford James
 
Elasticsearch V/s Relational Database
Elasticsearch V/s Relational DatabaseElasticsearch V/s Relational Database
Elasticsearch V/s Relational Database
Richa Budhraja
 
Elastic search apache_solr
Elastic search apache_solrElastic search apache_solr
Elastic search apache_solr
macrochen
 
Query DSL In Elasticsearch
Query DSL In ElasticsearchQuery DSL In Elasticsearch
Query DSL In Elasticsearch
Knoldus Inc.
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
Ricardo Peres
 
Searching Relational Data with Elasticsearch
Searching Relational Data with ElasticsearchSearching Relational Data with Elasticsearch
Searching Relational Data with Elasticsearch
sirensolutions
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
Lukas Vlcek
 
Elasticsearch first-steps
Elasticsearch first-stepsElasticsearch first-steps
Elasticsearch first-steps
Matteo Moci
 
Использование Elasticsearch для организации поиска по сайту
Использование Elasticsearch для организации поиска по сайтуИспользование Elasticsearch для организации поиска по сайту
Использование Elasticsearch для организации поиска по сайту
Olga Lavrentieva
 
Lucene Introduction
Lucene IntroductionLucene Introduction
Lucene Introduction
otisg
 
Elasticsearch - under the hood
Elasticsearch - under the hoodElasticsearch - under the hood
Elasticsearch - under the hood
SmartCat
 
Using elasticsearch with rails
Using elasticsearch with railsUsing elasticsearch with rails
Using elasticsearch with rails
Tom Z Zeng
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
George Stathis
 
Elasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetupElasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetup
Eric Rodriguez (Hiring in Lex)
 
Data Exploration with Elasticsearch
Data Exploration with ElasticsearchData Exploration with Elasticsearch
Data Exploration with Elasticsearch
Aleksander Stensby
 
Introduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of Lucene
Rahul Jain
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic search
Ivan Wallarm
 
Scaling Analytics with elasticsearch
Scaling Analytics with elasticsearchScaling Analytics with elasticsearch
Scaling Analytics with elasticsearch
dnoble00
 
JavaEdge09 : Java Indexing and Searching
JavaEdge09 : Java Indexing and SearchingJavaEdge09 : Java Indexing and Searching
JavaEdge09 : Java Indexing and Searching
Shay Sofer
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic search
markstory
 

What's hot (20)

Intro to Elasticsearch
Intro to ElasticsearchIntro to Elasticsearch
Intro to Elasticsearch
 
Elasticsearch V/s Relational Database
Elasticsearch V/s Relational DatabaseElasticsearch V/s Relational Database
Elasticsearch V/s Relational Database
 
Elastic search apache_solr
Elastic search apache_solrElastic search apache_solr
Elastic search apache_solr
 
Query DSL In Elasticsearch
Query DSL In ElasticsearchQuery DSL In Elasticsearch
Query DSL In Elasticsearch
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Searching Relational Data with Elasticsearch
Searching Relational Data with ElasticsearchSearching Relational Data with Elasticsearch
Searching Relational Data with Elasticsearch
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
Elasticsearch first-steps
Elasticsearch first-stepsElasticsearch first-steps
Elasticsearch first-steps
 
Использование Elasticsearch для организации поиска по сайту
Использование Elasticsearch для организации поиска по сайтуИспользование Elasticsearch для организации поиска по сайту
Использование Elasticsearch для организации поиска по сайту
 
Lucene Introduction
Lucene IntroductionLucene Introduction
Lucene Introduction
 
Elasticsearch - under the hood
Elasticsearch - under the hoodElasticsearch - under the hood
Elasticsearch - under the hood
 
Using elasticsearch with rails
Using elasticsearch with railsUsing elasticsearch with rails
Using elasticsearch with rails
 
Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"Elasticsearch & "PeopleSearch"
Elasticsearch & "PeopleSearch"
 
Elasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetupElasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetup
 
Data Exploration with Elasticsearch
Data Exploration with ElasticsearchData Exploration with Elasticsearch
Data Exploration with Elasticsearch
 
Introduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of Lucene
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic search
 
Scaling Analytics with elasticsearch
Scaling Analytics with elasticsearchScaling Analytics with elasticsearch
Scaling Analytics with elasticsearch
 
JavaEdge09 : Java Indexing and Searching
JavaEdge09 : Java Indexing and SearchingJavaEdge09 : Java Indexing and Searching
JavaEdge09 : Java Indexing and Searching
 
Simple search with elastic search
Simple search with elastic searchSimple search with elastic search
Simple search with elastic search
 

Similar to ElasticSearch Basics

Wanna search? Piece of cake!
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!
Alex Kursov
 
In search of: A meetup about Liferay and Search 2016-04-20
In search of: A meetup about Liferay and Search   2016-04-20In search of: A meetup about Liferay and Search   2016-04-20
In search of: A meetup about Liferay and Search 2016-04-20
Tibor Lipusz
 
Bridging Batch and Real-time Systems for Anomaly Detection
Bridging Batch and Real-time Systems for Anomaly DetectionBridging Batch and Real-time Systems for Anomaly Detection
Bridging Batch and Real-time Systems for Anomaly Detection
DataWorks Summit
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
gramana
 
ProjectHub
ProjectHubProjectHub
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
Ruslan Zavacky
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
Joey Wen
 
How to run Elasticsearch on Azure in just a few minutes
How to run Elasticsearch on Azure in just a few minutesHow to run Elasticsearch on Azure in just a few minutes
How to run Elasticsearch on Azure in just a few minutes
Christoph Wurm
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
JBug Italy
 
ElasticSearch Getting Started
ElasticSearch Getting StartedElasticSearch Getting Started
ElasticSearch Getting Started
Onuralp Taner
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using Lucene
Asad Abbas
 
Elasticsearch for beginners
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginners
Neil Baker
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
TO THE NEW | Technology
 
ElasticSearch in Production: lessons learned
ElasticSearch in Production: lessons learnedElasticSearch in Production: lessons learned
ElasticSearch in Production: lessons learned
BeyondTrees
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Robert Calcavecchia
 
Elasticsearch, a distributed search engine with real-time analytics
Elasticsearch, a distributed search engine with real-time analyticsElasticsearch, a distributed search engine with real-time analytics
Elasticsearch, a distributed search engine with real-time analytics
Tiziano Fagni
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
Divij Sehgal
 
Open Access Publishing on the Semantic Web
Open Access Publishing  on the  Semantic WebOpen Access Publishing  on the  Semantic Web
Open Access Publishing on the Semantic Web
Richard Cave
 
Solr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance studySolr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance study
Charlie Hull
 
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
Josue Balandrano
 

Similar to ElasticSearch Basics (20)

Wanna search? Piece of cake!
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!
 
In search of: A meetup about Liferay and Search 2016-04-20
In search of: A meetup about Liferay and Search   2016-04-20In search of: A meetup about Liferay and Search   2016-04-20
In search of: A meetup about Liferay and Search 2016-04-20
 
Bridging Batch and Real-time Systems for Anomaly Detection
Bridging Batch and Real-time Systems for Anomaly DetectionBridging Batch and Real-time Systems for Anomaly Detection
Bridging Batch and Real-time Systems for Anomaly Detection
 
Search Me: Using Lucene.Net
Search Me: Using Lucene.NetSearch Me: Using Lucene.Net
Search Me: Using Lucene.Net
 
ProjectHub
ProjectHubProjectHub
ProjectHub
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
 
How to run Elasticsearch on Azure in just a few minutes
How to run Elasticsearch on Azure in just a few minutesHow to run Elasticsearch on Azure in just a few minutes
How to run Elasticsearch on Azure in just a few minutes
 
Infinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGMInfinispan,Lucene,Hibername OGM
Infinispan,Lucene,Hibername OGM
 
ElasticSearch Getting Started
ElasticSearch Getting StartedElasticSearch Getting Started
ElasticSearch Getting Started
 
Advanced full text searching techniques using Lucene
Advanced full text searching techniques using LuceneAdvanced full text searching techniques using Lucene
Advanced full text searching techniques using Lucene
 
Elasticsearch for beginners
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginners
 
BigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearchBigData Search Simplified with ElasticSearch
BigData Search Simplified with ElasticSearch
 
ElasticSearch in Production: lessons learned
ElasticSearch in Production: lessons learnedElasticSearch in Production: lessons learned
ElasticSearch in Production: lessons learned
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
 
Elasticsearch, a distributed search engine with real-time analytics
Elasticsearch, a distributed search engine with real-time analyticsElasticsearch, a distributed search engine with real-time analytics
Elasticsearch, a distributed search engine with real-time analytics
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Open Access Publishing on the Semantic Web
Open Access Publishing  on the  Semantic WebOpen Access Publishing  on the  Semantic Web
Open Access Publishing on the Semantic Web
 
Solr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance studySolr and Elasticsearch, a performance study
Solr and Elasticsearch, a performance study
 
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
PEARC17: Designsafe: Using Elasticsearch to Share and Search Data on a Scienc...
 

Recently uploaded

Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

ElasticSearch Basics

  • 2. Why we need SEARCH ENGINE!!!  Work Life without Google ?  Amazon,Flipkart,Facebook,Twitter,GitHub, StackOverflow,Zomato don’t have a search capability ?
  • 3. You know, for search …  Lot of DATA around us but less INFORMATION.  Make our life easier.  Find relevant stuff.  Find it faster.  For research,to shop,for entertainment etc
  • 4. Elasticsearch !!!  Real-time(near real time) distributed search & analytics engine  Runs on top of Apache Lucene, written in Java,supports REST API  Search Engine Software  Private search engine service (like a Bing or a Google) but with say, private, sensitive, or confidential data/documents that you don’t want on the public web  Developed by Shay Banon
  • 5. ElasticSearch Clients  Git Hub  StackOverflow  Wikipedia  The Guardian  SoundCloud  McGraw-Hill
  • 6. Relational db vs Elasticsearch
  • 7. ElasticSearch Concepts  Document : JSON document stored in ES. Like row in table in Relational DB  Id : Uniquely identifies a document  Field : key-value pairs. Like column in Relational DB - Simple value like string ,integer, date - Array or an object  Type : Like a table in realational DB.Has list of fields.
  • 8. ElasticSearch Concepts  Near RealTime(nrt) : Slight time lag between index a document and being searchable.  Shard : Low level worker unit,Single lucene instance - Primary Shard (Physically stored document) - Replica Shard (Copy of primary shard)  Index : Like Database in relational db,Logical namespace which maps to primary and replica shard  Node : Running instance of elasticsearch
  • 9. ElasticSearch Concepts  Cluster : Collection of one or more nodes - Facilitates indexing - Search capabilities across nodes
  • 12. ElasticSearch Getting Started …  Recent version of Java  elasticsearch.org/download  Latest version of any browser  Marvel & Sense  Marvel : monitoring and management tool  Sense : interactive console
  • 13. Talking to ElasticSearch  RESTful api json over http  A request to Elasticsearch consists of the same parts as any HTTP request: curl -X<VERB> '<PROTOCOL>://<HOST>/<PATH>' -d '<BODY>‘ curl -X<VERB> '<PROTOCOL>://<HOST>/<PATH>?<QUERY_STRING>'
  • 14. Document Oriented  Stores entire objects or documents. It not only stores them, but also indexes the contents of each document in order to make them searchable  Elasticsearch uses JavaScript Object Notation, or JSON, { "email": "john@smith.com", "first_name": "John", "last_name": "Smith", "info": { "bio": "Eco-warrior and defender of the weak", "age": 25, "interests": [ "dolphins", "whales" ] }, "join_date": "2014/05/01" }
  • 15. Create Index,Insert Data …  Cluster : myelasticsearch Node : The Dark Knight Index : Megacorp Type : Employee  A request to Elasticsearch consists of the same parts as any HTTP request(Using Sense): <VERB> '<PROTOCOL>://<HOST>/<INDEX>/<TYPE>/ID ' '<BODY>‘ <VERB> '<PROTOCOL>://<HOST>/<PATH><INDEX>/<TYPE>/ID /?<QUERY_STRING>'  Create Index Example : PUT localhost:9201/megacorp/employee/1 { "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] }
  • 16. What is Inverted Index?  It allows very fast full text search.  Doc_1 : The quick brown fox jumped over the lazy dog Doc_2 : Quick brown foxes leap over lazy dogs in summer.
  • 17. Inverted Index cont  Search “quick brown”  Both docs match here. Doc_1 is more relevant.
  • 18. Analysis and Analyzers  Character filters A character filter could be used to strip out HTML, or to convert &characters to the word and.  Tokenizer Next, the string is tokenized into individual terms by a tokenizer.  Token filters Last, each term is passed through any token filters in turn, which can change terms (for example, lowercasing Quick), remove terms (for example, stopwords such as a, and, the) or add terms (for example, synonyms like jump and leap).  Examples: Standard Analyzer,Simple Analyzer,Whitespace analyzer,Language Analyzers etc
  • 19. Inverted Index After Analysis  Doc_1 : The quick brown fox jumped over the lazy dog Doc_2 : Quick brown foxes leap over lazy dogs in summer.  Quick can be lowercased to become quick.  foxes can be stemmed--reduced to its root form—to Become fox. Similarly, dogs could be stemmed to dog.  jumped and leap are synonyms and can be indexed as just the single term jump.
  • 20. Retrieve Using Query String (SearchLite)…  Retrieve Example : GET localhost:9201/megacorp/employee/1  Query String Search Example : GET /megacorp/employee/_search?q=last_name:Smith
  • 21. Retrieve Using DSL …  Query DSL Search Build complicated and robust queries.  The domain-specific language (DSL) is specified using a JSON request body.  Example : GET /megacorp/employee/_search { "query": { "match": { "last_name": "Smith" } } }
  • 22. Querying First part is the range Filter. Second Part is the Match query
  • 23. Full Text Search  Elasticsearch can search within full-text fields and return the most relevant results first. This concept of relevance is important to Elasticsearch, and is a concept that is completely foreign to traditional relational databases, in which a record either matches or it doesn’t.
  • 24. Full Text Search Example
  • 25. Phrase Search  Matching Exact sequence of words or phrases
  • 26. Highlight Searches  Highlight snippets of text from each search result.