SlideShare a Scribd company logo
1 of 47
Download to read offline
#SPERASOFT TALKS Introduction to
Elastic 
✓easy to install 
✓horizontally scalable 
✓highly available
Search 
lucene inside 
ranked searching 
proximity matches 
wildcard queries 
range queries 
sorting 
typo-tolerant 
flexible faceting 
simultaneous update and searching 
high performance 
highlighting 
aggregations 
geolocations
Elasticsearch 
distributed 
hi available 
RESTful 
crossplatform 
open source 
apache 2 licenced 
powerful
Dealing with human language 
Remove diacritics like ´, ^ and ¨ (normalizing) Get root form of a word (stemming) 
number 
Tense 
Gender 
Aspect (ate, eaten) 
etc remove stopwords from search Take synonyms into account Check for misspelling (fuzzy matching) Check for homophones
Mapping to RDB keywords 
•RDB 
•database 
•table 
•row 
•Column/cell 
•Index 
•SQL 
•Elasticsearch 
•index 
•type 
•Document (JSON) 
•Field 
•Index (some ambiguousy but who cares) 
•DSL via HTTP
Storing Data 
•PUT http://es-host/your-index/your-type/id 
•POST http://es-host/your-index/your-type POST http://localhost:9200/test/persons { "name" : { “first name" : "Bill", "second name" : "Gates" }, "gender" : "male", "age" : 58, "photo" : "http://photobank.som/p5pdynix5evsqw6sdlx11i5p1qtnhuxb/200x320", "company" : "Microsoft", "location" : { “address" : { "country" : "US", "city" : "Medina", "address“ : "unknown" }, "latitude" : 47.59375, "longitude" : -122.39926147460938 }, "emails": [ "bill@gmail.som", "boss@microsotf.com" ], "phones" : [ “1234567890”], "interested in" : [ "science", "computers", “windows”, “charity” ], "balance" : 76000000000.00, "registered" : "Sep 7, 2004 9:28:09 AM" 
}
Get 
GET http://es-host/your-index/your-type/id
Multi Get
Simple Search via query 
GET http://host/index/type/_search?q={query string}
Some more conditions 
first name = Evgeny AND interested in = curling: 
GET /test/persons/_search?q=%2Bname.first%20name%3AEvgeny+%2Binterested%20in%3Acurling 
Too much %s
Wildcards 
first name = Evgeny AND interested in = cu???ng AND country = Ru*a 
GET /test/persons/_search?q=%2Bname.first%20name%3AEvgeny+%2Binterested%20in%3Acu%3F%3F%3Fng+%2Bcountry%3ARu*a
Search via DSL
Fraze search 
“match_fraze” : { “field” : “fraze” }
Mapping
Dynamic mapping
You are wrong
Mapping change is not simple
Geo locations
highlighting
Aggregations 
Two types 
bucketing 
metrics Aggregations can be nested! Buckets can have sub-buckets
Aggregations
Have a question? Like this deck? 
Just follow us on twitter @Sperasoft
Filtering 
•Filtered queries (affect search results and aggregations) 
•Filter buckets (affect only aggregations) 
•Post filters (affect only search results) 
filtered queries 
aggegations with 
filter buckets 
post filters
Post Filter 
Does not affect aggregations
Distributed document store 
alone node
Distributed document store 
alone node 
is cluster too
Joining nodes 
... 
################################### Cluster ################################### 
# Cluster name identifies your cluster for auto- 
# discovery. If you're running 
# multiple clusters on the same network, make sure you're 
# using unique names. 
# 
cluster.name: elasticsearch 
... 
# Set a custom port for the node to node communication 
# (9300 by default): 
# 
transport.tcp.port: 9300 
/elastic/config/elasticsearch.yml 
cluster.name: my_cluster
Distributed document store 
node 1 
node 2 
Master node is in charge of managing cluster wide stuff, such as creating/deleting an index or adding/removing a node
Shards
Distributed document store 
P0 
P1 
P2 
R0 
R1 
R2
Adding third node 
P0 
P1 
P2 
R0 
R1 
R2
More shards 
P0 
P1 
P2 
R0 
R1 
R2 
The number of primary shards is fixed at the moment an index is created. 
PUT /orders/_settings 
{ 
"number_of_replicas" : 2 
} 
R1 
R0 
R2
Marvel plugin 
sence 
plugin -i elasticsearch/marvel/latest
Overview
Kibana
Kibana queries and filters
Kibana settings
How to make your colleague wonder 
DELETE kibana-int
Extensible 
✓plugins (rivers, ui and others) 
✓scripts (scoring, script fields etc) 
✓custom analyzers and tokenizers 
✓open source
Plugins 
Provides ability to add functionality to the elasticsearch 
✓RestModule 
✓RiverModule 
✓AnalysisModule 
✓NetworkModule 
✓and other modules 
to install: plugin -i <org>/<user/component>/<version> 
elastic/plugins/_site -> http://es_node:9200/_plugin/[plugin_name]/ 
UI: 
public void onModule(RiversModule module) { 
module.registerRiver("myRiver", MyRiverModule.class); 
} 
public void onModule(AnalysisModule module) { 
module.addAnalyzer("my-analyzer", MyAnalyzerProvider.class); 
} 
public void onModule(ScriptModule module) { 
module.addScriptEngine(NewScriptEngineService.class); 
} 
don’t forget to write es-plugin.properties
Scripts 
✓Elasticsearch default script language is groovy (before version 1.3 default language was ?mvel?) 
✓If you want, you can add your own language support via plugins 
✓unsecure scripts (non sandbox languages) should be placed in config/scripts directory 
✓you can store scripts in special index (for sandboxed languages only) 
"custom_score" : { 
"query" : { 
.... 
}, 
"params" : { 
"param1" : 2, 
"param2" : 3.1 
}, 
"script" : "_score * doc['my_numeric_field'].value / 
pow(param1, param2)" 
} 
you can use scripts streight from query:
Using of Stored Script 
{ 
"query": { 
"function_score": { 
"query": { 
"match": { 
"body": "foo" 
} 
}, 
"functions": [ 
{ 
"script_score": { 
"script": "calculate-score", 
"params": { 
"my_modifier": 8 
} 
} 
} 
] 
} 
} 
}
Some Other Scripts 
Field scripts: 
{ 
"query" : { 
... 
}, 
"script_fields" : { 
"test1" : { 
"script" : "doc['my_field_name'].value * 2" 
}, 
"test2" : { 
"script" : "doc['my_field_name'].value * factor", 
"params" : { 
"factor" : 2.0 
} 
} 
} 
} 
sort scripts 
{ 
"query" : { 
.... 
}, 
"sort" : { 
"_script" : { 
"script" : "doc['field_name'].value * factor", 
"type" : "number", 
"params" : { 
"factor" : 1.1 
}, 
"order" : "asc" 
} 
} 
}
Custom analyzers and tokenizers 
✓Tokenizers split texts into tokens 
✓Analyzers are composed of a single tokenizer and zero or more token filters 
✓Also analyzers can contain one or more char filters 
{ 
"settings": { 
"analysis": { 
"filter": { 
"russian_stop": { 
"type": "stop", 
"stopwords": "_russian_" 
}, 
"russian_keywords": { 
"type": "keyword_marker", 
"keywords": [] 
}, 
"russian_stemmer": { 
"type": "stemmer", 
"language": "russian" 
} 
}, 
"analyzer": { 
"russian": { 
"tokenizer": "standard", 
"filter": [ 
"lowercase", 
"russian_stop", 
"russian_keywords", 
"russian_stemmer" 
] 
} 
} 
} 
} 
} 
PUT it to your index 
Combination of tokenizer and filters 
Response: 
{ 
"tokens": [ 
{ 
"token": "пиш", 
"start_offset": 6, 
"end_offset": 10, 
"type": "<ALPHANUM>", 
"position": 3 
}, 
{ 
"token": "бол", 
"start_offset": 20, 
"end_offset": 24, 
"type": "<ALPHANUM>", 
"position": 6 
} 
] 
}
Other Features 
✓bulk operations 
✓result sorting 
✓parent-children relations support 
✓custom filters score query 
✓function score query 
✓percolation 
✓more like this document api 
✓numeric aggregation scripts 
✓and others
Follow us on Twitter @Sperasoft Visit our site: sperasoft.com 
Thanks!

More Related Content

What's hot

ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013Roy Russo
 
Elasticsearch - DevNexus 2015
Elasticsearch - DevNexus 2015Elasticsearch - DevNexus 2015
Elasticsearch - DevNexus 2015Roy Russo
 
Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Vinay Kumar
 
Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!Philips Kokoh Prasetyo
 
Elasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuningElasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuningPetar Djekic
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in actionCodemotion
 
Solr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by CaseSolr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by CaseAlexandre Rafalovitch
 
quick intro to elastic search
quick intro to elastic search quick intro to elastic search
quick intro to elastic search medcl
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic searchIvan Wallarm
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to ElasticsearchJason Austin
 
Elastic search Walkthrough
Elastic search WalkthroughElastic search Walkthrough
Elastic search WalkthroughSuhel Meman
 
Elastic search apache_solr
Elastic search apache_solrElastic search apache_solr
Elastic search apache_solrmacrochen
 
Elasticsearch presentation 1
Elasticsearch presentation 1Elasticsearch presentation 1
Elasticsearch presentation 1Maruf Hassan
 
Elasticsearch as a search alternative to a relational database
Elasticsearch as a search alternative to a relational databaseElasticsearch as a search alternative to a relational database
Elasticsearch as a search alternative to a relational databaseKristijan Duvnjak
 
Elasticsearch for Data Analytics
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data AnalyticsFelipe
 
Elasticsearch - under the hood
Elasticsearch - under the hoodElasticsearch - under the hood
Elasticsearch - under the hoodSmartCat
 

What's hot (20)

ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013
 
Elasticsearch - DevNexus 2015
Elasticsearch - DevNexus 2015Elasticsearch - DevNexus 2015
Elasticsearch - DevNexus 2015
 
Roaring with elastic search sangam2018
Roaring with elastic search sangam2018Roaring with elastic search sangam2018
Roaring with elastic search sangam2018
 
Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!Elasticsearch: You know, for search! and more!
Elasticsearch: You know, for search! and more!
 
Elasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuningElasticsearch 101 - Cluster setup and tuning
Elasticsearch 101 - Cluster setup and tuning
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 
ElasticSearch in action
ElasticSearch in actionElasticSearch in action
ElasticSearch in action
 
Solr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by CaseSolr vs. Elasticsearch - Case by Case
Solr vs. Elasticsearch - Case by Case
 
quick intro to elastic search
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
 
Dcm#8 elastic search
Dcm#8  elastic searchDcm#8  elastic search
Dcm#8 elastic search
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Elasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetupElasticsearch Introduction at BigData meetup
Elasticsearch Introduction at BigData meetup
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Elastic search Walkthrough
Elastic search WalkthroughElastic search Walkthrough
Elastic search Walkthrough
 
Elastic search apache_solr
Elastic search apache_solrElastic search apache_solr
Elastic search apache_solr
 
Elastic search
Elastic searchElastic search
Elastic search
 
Elasticsearch presentation 1
Elasticsearch presentation 1Elasticsearch presentation 1
Elasticsearch presentation 1
 
Elasticsearch as a search alternative to a relational database
Elasticsearch as a search alternative to a relational databaseElasticsearch as a search alternative to a relational database
Elasticsearch as a search alternative to a relational database
 
Elasticsearch for Data Analytics
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data Analytics
 
Elasticsearch - under the hood
Elasticsearch - under the hoodElasticsearch - under the hood
Elasticsearch - under the hood
 

Viewers also liked

What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...Rahul K Chauhan
 
Elastic search & patent information @ mtc
Elastic search & patent information @ mtcElastic search & patent information @ mtc
Elastic search & patent information @ mtcArne Krueger
 
James elastic search
James   elastic searchJames   elastic search
James elastic searchLearningTech
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocateAayush Shrestha
 
Elastic Search Indexing Internals
Elastic Search Indexing InternalsElastic Search Indexing Internals
Elastic Search Indexing InternalsGaurav Kukal
 
Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets Shamane Siriwardhana
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Kang-min Liu
 
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)dnaber
 
Diario Resumen 20170315
Diario Resumen 20170315Diario Resumen 20170315
Diario Resumen 20170315Diario Resumen
 
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Ryft
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?lucenerevolution
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrRahul Jain
 

Viewers also liked (17)

What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...What I learnt: Elastic search & Kibana : introduction, installtion & configur...
What I learnt: Elastic search & Kibana : introduction, installtion & configur...
 
Elastic search & patent information @ mtc
Elastic search & patent information @ mtcElastic search & patent information @ mtc
Elastic search & patent information @ mtc
 
(Elastic)search in big data
(Elastic)search in big data(Elastic)search in big data
(Elastic)search in big data
 
Elastic search
Elastic searchElastic search
Elastic search
 
James elastic search
James   elastic searchJames   elastic search
James elastic search
 
IEEE CLOUD \'11
IEEE CLOUD \'11IEEE CLOUD \'11
IEEE CLOUD \'11
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
Elastic Search Indexing Internals
Elastic Search Indexing InternalsElastic Search Indexing Internals
Elastic Search Indexing Internals
 
Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets Introduction to Convolutional Neural Nets
Introduction to Convolutional Neural Nets
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Lucene basics
Lucene basicsLucene basics
Lucene basics
 
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)Apache Lucene: Searching the Web and Everything Else (Jazoon07)
Apache Lucene: Searching the Web and Everything Else (Jazoon07)
 
Diario Resumen 20170315
Diario Resumen 20170315Diario Resumen 20170315
Diario Resumen 20170315
 
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
Expanding Elastic: Learn how anyone can leverage heterogeneous compute to ext...
 
What is in a Lucene index?
What is in a Lucene index?What is in a Lucene index?
What is in a Lucene index?
 
Introduction to Apache Lucene/Solr
Introduction to Apache Lucene/SolrIntroduction to Apache Lucene/Solr
Introduction to Apache Lucene/Solr
 

Similar to Introduction to Elasticsearch

Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Data Con LA
 
Intro to Elasticsearch
Intro to ElasticsearchIntro to Elasticsearch
Intro to ElasticsearchClifford James
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersBen van Mol
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersMichael Rys
 
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQLTaming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQLMichael Rys
 
Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Michael Rys
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overviewAmit Juneja
 
Gab document db scaling database
Gab   document db scaling databaseGab   document db scaling database
Gab document db scaling databaseMUG Perú
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
About elasticsearch
About elasticsearchAbout elasticsearch
About elasticsearchMinsoo Jun
 
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 analyticsTiziano Fagni
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Codemotion
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQLSatoshi Nagayasu
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" DataArt
 
Elastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachElastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachSymfonyMu
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)Pat Patterson
 
Compass Framework
Compass FrameworkCompass Framework
Compass FrameworkLukas Vlcek
 
A Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeA Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeDatabricks
 

Similar to Introduction to Elasticsearch (20)

Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
 
ElasticSearch
ElasticSearchElasticSearch
ElasticSearch
 
Intro to Elasticsearch
Intro to ElasticsearchIntro to Elasticsearch
Intro to Elasticsearch
 
ElasticSearch for .NET Developers
ElasticSearch for .NET DevelopersElasticSearch for .NET Developers
ElasticSearch for .NET Developers
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQLTaming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
 
Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)
 
Elasticsearch an overview
Elasticsearch   an overviewElasticsearch   an overview
Elasticsearch an overview
 
Gab document db scaling database
Gab   document db scaling databaseGab   document db scaling database
Gab document db scaling database
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
About elasticsearch
About elasticsearchAbout elasticsearch
About elasticsearch
 
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
 
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys" IT talk SPb "Full text search for lazy guys"
IT talk SPb "Full text search for lazy guys"
 
Elastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approachElastic search and Symfony3 - A practical approach
Elastic search and Symfony3 - A practical approach
 
MongoDB 3.0
MongoDB 3.0 MongoDB 3.0
MongoDB 3.0
 
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
OData: Universal Data Solvent or Clunky Enterprise Goo? (GlueCon 2015)
 
Compass Framework
Compass FrameworkCompass Framework
Compass Framework
 
A Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta LakeA Practical Enterprise Feature Store on Delta Lake
A Practical Enterprise Feature Store on Delta Lake
 

More from Sperasoft

особенности работы с Locomotion в Unreal Engine 4
особенности работы с Locomotion в Unreal Engine 4особенности работы с Locomotion в Unreal Engine 4
особенности работы с Locomotion в Unreal Engine 4Sperasoft
 
концепт и архитектура геймплея в Creach: The Depleted World
концепт и архитектура геймплея в Creach: The Depleted Worldконцепт и архитектура геймплея в Creach: The Depleted World
концепт и архитектура геймплея в Creach: The Depleted WorldSperasoft
 
Опыт разработки VR игры для UE4
Опыт разработки VR игры для UE4Опыт разработки VR игры для UE4
Опыт разработки VR игры для UE4Sperasoft
 
Организация работы с UE4 в команде до 20 человек
Организация работы с UE4 в команде до 20 человек Организация работы с UE4 в команде до 20 человек
Организация работы с UE4 в команде до 20 человек Sperasoft
 
Gameplay Tags
Gameplay TagsGameplay Tags
Gameplay TagsSperasoft
 
Data Driven Gameplay in UE4
Data Driven Gameplay in UE4Data Driven Gameplay in UE4
Data Driven Gameplay in UE4Sperasoft
 
Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Sperasoft
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databasesSperasoft
 
Automated layout testing using Galen Framework
Automated layout testing using Galen FrameworkAutomated layout testing using Galen Framework
Automated layout testing using Galen FrameworkSperasoft
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft
 
Sperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft Talks: RxJava Functional Reactive Programming on AndroidSperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft Talks: RxJava Functional Reactive Programming on AndroidSperasoft
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft
 
Effective Мeetings
Effective МeetingsEffective Мeetings
Effective МeetingsSperasoft
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 IntroductionSperasoft
 
JIRA Development
JIRA DevelopmentJIRA Development
JIRA DevelopmentSperasoft
 
MOBILE DEVELOPMENT with HTML, CSS and JS
MOBILE DEVELOPMENT with HTML, CSS and JSMOBILE DEVELOPMENT with HTML, CSS and JS
MOBILE DEVELOPMENT with HTML, CSS and JSSperasoft
 
Quick Intro Into Kanban
Quick Intro Into KanbanQuick Intro Into Kanban
Quick Intro Into KanbanSperasoft
 
ECMAScript 6 Review
ECMAScript 6 ReviewECMAScript 6 Review
ECMAScript 6 ReviewSperasoft
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutesSperasoft
 
Database Indexes
Database IndexesDatabase Indexes
Database IndexesSperasoft
 

More from Sperasoft (20)

особенности работы с Locomotion в Unreal Engine 4
особенности работы с Locomotion в Unreal Engine 4особенности работы с Locomotion в Unreal Engine 4
особенности работы с Locomotion в Unreal Engine 4
 
концепт и архитектура геймплея в Creach: The Depleted World
концепт и архитектура геймплея в Creach: The Depleted Worldконцепт и архитектура геймплея в Creach: The Depleted World
концепт и архитектура геймплея в Creach: The Depleted World
 
Опыт разработки VR игры для UE4
Опыт разработки VR игры для UE4Опыт разработки VR игры для UE4
Опыт разработки VR игры для UE4
 
Организация работы с UE4 в команде до 20 человек
Организация работы с UE4 в команде до 20 человек Организация работы с UE4 в команде до 20 человек
Организация работы с UE4 в команде до 20 человек
 
Gameplay Tags
Gameplay TagsGameplay Tags
Gameplay Tags
 
Data Driven Gameplay in UE4
Data Driven Gameplay in UE4Data Driven Gameplay in UE4
Data Driven Gameplay in UE4
 
Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databases
 
Automated layout testing using Galen Framework
Automated layout testing using Galen FrameworkAutomated layout testing using Galen Framework
Automated layout testing using Galen Framework
 
Sperasoft talks: Android Security Threats
Sperasoft talks: Android Security ThreatsSperasoft talks: Android Security Threats
Sperasoft talks: Android Security Threats
 
Sperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft Talks: RxJava Functional Reactive Programming on AndroidSperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft Talks: RxJava Functional Reactive Programming on Android
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015
 
Effective Мeetings
Effective МeetingsEffective Мeetings
Effective Мeetings
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 
JIRA Development
JIRA DevelopmentJIRA Development
JIRA Development
 
MOBILE DEVELOPMENT with HTML, CSS and JS
MOBILE DEVELOPMENT with HTML, CSS and JSMOBILE DEVELOPMENT with HTML, CSS and JS
MOBILE DEVELOPMENT with HTML, CSS and JS
 
Quick Intro Into Kanban
Quick Intro Into KanbanQuick Intro Into Kanban
Quick Intro Into Kanban
 
ECMAScript 6 Review
ECMAScript 6 ReviewECMAScript 6 Review
ECMAScript 6 Review
 
Console Development in 15 minutes
Console Development in 15 minutesConsole Development in 15 minutes
Console Development in 15 minutes
 
Database Indexes
Database IndexesDatabase Indexes
Database Indexes
 

Recently uploaded

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 

Recently uploaded (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Introduction to Elasticsearch

  • 2. Elastic ✓easy to install ✓horizontally scalable ✓highly available
  • 3. Search lucene inside ranked searching proximity matches wildcard queries range queries sorting typo-tolerant flexible faceting simultaneous update and searching high performance highlighting aggregations geolocations
  • 4. Elasticsearch distributed hi available RESTful crossplatform open source apache 2 licenced powerful
  • 5. Dealing with human language Remove diacritics like ´, ^ and ¨ (normalizing) Get root form of a word (stemming) number Tense Gender Aspect (ate, eaten) etc remove stopwords from search Take synonyms into account Check for misspelling (fuzzy matching) Check for homophones
  • 6. Mapping to RDB keywords •RDB •database •table •row •Column/cell •Index •SQL •Elasticsearch •index •type •Document (JSON) •Field •Index (some ambiguousy but who cares) •DSL via HTTP
  • 7. Storing Data •PUT http://es-host/your-index/your-type/id •POST http://es-host/your-index/your-type POST http://localhost:9200/test/persons { "name" : { “first name" : "Bill", "second name" : "Gates" }, "gender" : "male", "age" : 58, "photo" : "http://photobank.som/p5pdynix5evsqw6sdlx11i5p1qtnhuxb/200x320", "company" : "Microsoft", "location" : { “address" : { "country" : "US", "city" : "Medina", "address“ : "unknown" }, "latitude" : 47.59375, "longitude" : -122.39926147460938 }, "emails": [ "bill@gmail.som", "boss@microsotf.com" ], "phones" : [ “1234567890”], "interested in" : [ "science", "computers", “windows”, “charity” ], "balance" : 76000000000.00, "registered" : "Sep 7, 2004 9:28:09 AM" }
  • 10. Simple Search via query GET http://host/index/type/_search?q={query string}
  • 11. Some more conditions first name = Evgeny AND interested in = curling: GET /test/persons/_search?q=%2Bname.first%20name%3AEvgeny+%2Binterested%20in%3Acurling Too much %s
  • 12. Wildcards first name = Evgeny AND interested in = cu???ng AND country = Ru*a GET /test/persons/_search?q=%2Bname.first%20name%3AEvgeny+%2Binterested%20in%3Acu%3F%3F%3Fng+%2Bcountry%3ARu*a
  • 14. Fraze search “match_fraze” : { “field” : “fraze” }
  • 18. Mapping change is not simple
  • 21. Aggregations Two types bucketing metrics Aggregations can be nested! Buckets can have sub-buckets
  • 23. Have a question? Like this deck? Just follow us on twitter @Sperasoft
  • 24. Filtering •Filtered queries (affect search results and aggregations) •Filter buckets (affect only aggregations) •Post filters (affect only search results) filtered queries aggegations with filter buckets post filters
  • 25. Post Filter Does not affect aggregations
  • 27. Distributed document store alone node is cluster too
  • 28. Joining nodes ... ################################### Cluster ################################### # Cluster name identifies your cluster for auto- # discovery. If you're running # multiple clusters on the same network, make sure you're # using unique names. # cluster.name: elasticsearch ... # Set a custom port for the node to node communication # (9300 by default): # transport.tcp.port: 9300 /elastic/config/elasticsearch.yml cluster.name: my_cluster
  • 29. Distributed document store node 1 node 2 Master node is in charge of managing cluster wide stuff, such as creating/deleting an index or adding/removing a node
  • 31. Distributed document store P0 P1 P2 R0 R1 R2
  • 32. Adding third node P0 P1 P2 R0 R1 R2
  • 33. More shards P0 P1 P2 R0 R1 R2 The number of primary shards is fixed at the moment an index is created. PUT /orders/_settings { "number_of_replicas" : 2 } R1 R0 R2
  • 34. Marvel plugin sence plugin -i elasticsearch/marvel/latest
  • 39. How to make your colleague wonder DELETE kibana-int
  • 40. Extensible ✓plugins (rivers, ui and others) ✓scripts (scoring, script fields etc) ✓custom analyzers and tokenizers ✓open source
  • 41. Plugins Provides ability to add functionality to the elasticsearch ✓RestModule ✓RiverModule ✓AnalysisModule ✓NetworkModule ✓and other modules to install: plugin -i <org>/<user/component>/<version> elastic/plugins/_site -> http://es_node:9200/_plugin/[plugin_name]/ UI: public void onModule(RiversModule module) { module.registerRiver("myRiver", MyRiverModule.class); } public void onModule(AnalysisModule module) { module.addAnalyzer("my-analyzer", MyAnalyzerProvider.class); } public void onModule(ScriptModule module) { module.addScriptEngine(NewScriptEngineService.class); } don’t forget to write es-plugin.properties
  • 42. Scripts ✓Elasticsearch default script language is groovy (before version 1.3 default language was ?mvel?) ✓If you want, you can add your own language support via plugins ✓unsecure scripts (non sandbox languages) should be placed in config/scripts directory ✓you can store scripts in special index (for sandboxed languages only) "custom_score" : { "query" : { .... }, "params" : { "param1" : 2, "param2" : 3.1 }, "script" : "_score * doc['my_numeric_field'].value / pow(param1, param2)" } you can use scripts streight from query:
  • 43. Using of Stored Script { "query": { "function_score": { "query": { "match": { "body": "foo" } }, "functions": [ { "script_score": { "script": "calculate-score", "params": { "my_modifier": 8 } } } ] } } }
  • 44. Some Other Scripts Field scripts: { "query" : { ... }, "script_fields" : { "test1" : { "script" : "doc['my_field_name'].value * 2" }, "test2" : { "script" : "doc['my_field_name'].value * factor", "params" : { "factor" : 2.0 } } } } sort scripts { "query" : { .... }, "sort" : { "_script" : { "script" : "doc['field_name'].value * factor", "type" : "number", "params" : { "factor" : 1.1 }, "order" : "asc" } } }
  • 45. Custom analyzers and tokenizers ✓Tokenizers split texts into tokens ✓Analyzers are composed of a single tokenizer and zero or more token filters ✓Also analyzers can contain one or more char filters { "settings": { "analysis": { "filter": { "russian_stop": { "type": "stop", "stopwords": "_russian_" }, "russian_keywords": { "type": "keyword_marker", "keywords": [] }, "russian_stemmer": { "type": "stemmer", "language": "russian" } }, "analyzer": { "russian": { "tokenizer": "standard", "filter": [ "lowercase", "russian_stop", "russian_keywords", "russian_stemmer" ] } } } } } PUT it to your index Combination of tokenizer and filters Response: { "tokens": [ { "token": "пиш", "start_offset": 6, "end_offset": 10, "type": "<ALPHANUM>", "position": 3 }, { "token": "бол", "start_offset": 20, "end_offset": 24, "type": "<ALPHANUM>", "position": 6 } ] }
  • 46. Other Features ✓bulk operations ✓result sorting ✓parent-children relations support ✓custom filters score query ✓function score query ✓percolation ✓more like this document api ✓numeric aggregation scripts ✓and others
  • 47. Follow us on Twitter @Sperasoft Visit our site: sperasoft.com Thanks!