2012 06-26 - apresentação sobre elasticsearch
DESCRIPTION
http://blog.lucascaton.com.br/?p=1373TRANSCRIPT
Getting search working should not be hard.
Lucas Catón
ElasticSearch?Full-text search engine and database.
It’s based on Lucene...
Written in Java (fast!)painless setupopen-source
Real-time searchFull-text search engine and database
CommunicatingJSON over RESTful HTTP
Free search schemaDocument oriented
Cloud-ready & distributedBuilt for the cloud
Highly-availableAlways available
ScalableScale to hundreds
Benchmarks by Socialcast Engineeringhttp://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/
Benchmarks by Socialcast Engineeringhttp://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/
Benchmarks by Socialcast Engineeringhttp://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/
Benchmarks by Socialcast Engineeringhttp://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/
Query DSL
'delete''by'
'query''deletebyquery'
Normalise values
"deleteByQuery"
and search terms
"DELETE QUERY"
'delete''by'
'query''deletebyquery'
Normalise values
"deleteByQuery"
and search terms
"DELETE QUERY"
Analyse
What is stored in ElasticSearch?
{ tweet => "Perl is GREAT!", posted => "2011-08-15", user => { name => "Clinton Gormley", email => "[email protected]" }, tags => ["perl","opinion"], posts => 2}
Document:
{ tweet => "Perl is GREAT!", posted => "2011-08-15", user => { name => "Clinton Gormley", email => "[email protected]" }, tags => ["perl","opinion"], posts => 2}
Document:
Fields
{ tweet => "Perl is GREAT!", posted => "2011-08-15", user => { name => "Clinton Gormley", email => "[email protected]" }, tags => ["perl","opinion"], posts => 2}
Document:Values
Built in analyzers:
Pattern, Language, Snowball, Custom, StandardSimple, Whitespace, Stop, Keyword
keyword:The Brown-Cow's Part_No. #A.BC123-456 [email protected]
whitespace:The, Brown-Cow's, Part_No., #A.BC123-456, [email protected]
simple:the, brown, cow, s, part, no, a, bc, joe, bloggs, com
standard:brown, cow's, part_no, a.bc123, 456, joe, bloggs.com
snowball (English):brown, cow, part_no, a.bc123, 456, joe, bloggs.com
The Brown-Cow's Part_No. #A.BC123-456 [email protected]
RTFM!
Language Analyzers
A set of analyzers aimed at analyzing specific language text. The following types are supported: arabic, armenian, basque, brazilian, bulgarian, catalan, chinese,
cjk, czech, danish, dutch, english, finnish, french, galician, german, greek, hindi, hungarian, indonesian, italian, norwegian, persian, portuguese, romanian,
russian, spanish, swedish, turkish, thai.
ClientsJava, Ruby, PHP, Groovy, Python, Perl, Erlang, .NET, Clojure, Scala...
Ruby clientshttps://github.com/karmi/tireGreat documentation, easy installation, flexible.↪ 43,605 total downloads (rubygems.org)
https://github.com/grantr/rubberbandPoor documentation.↪ 9,570 total downloads (rubygems.org)
https://github.com/wireframe/elastic_searchable/Not very flexible.↪ 16,820 total downloads (rubygems.org)
https://github.com/angelf/escargotNot ready yet (WIP).↪ 998 total downloads (rubygems.org)
Ruby clientshttps://github.com/karmi/tireGreat documentation, easy installation, flexible.↪ 43,605 total downloads (rubygems.org)
https://github.com/grantr/rubberbandPoor documentation.↪ 9,570 total downloads (rubygems.org)
https://github.com/wireframe/elastic_searchable/Not very flexible.↪ 16,820 total downloads (rubygems.org)
https://github.com/angelf/escargotNot ready yet (WIP).↪ 998 total downloads (rubygems.org)
Levenshtein algorithm(similarity based on distance)
Rails
> highlight :tags, :title, :options => { :tag => '<strong>' }
=> "Foo <strong>matched word</strong> Bar"
https://github.com/karmi/tire/blob/master/test/integration/highlight_test.rb
Highlight
Powerfull aggregation feature (Facets)
Powerfull aggregation feature (Facets)
Plugins
How to install:/path/elasticsearch/<version>/bin/plugin -install <plugin_name>
Plugin - elasticsearch-headA web front end for an ElasticSearch cluster
https://github.com/mobz/elasticsearch-head
Plugin - elasticsearch-head
Plugin - elasticsearch-head
Plugin - ParamedicA simple tool to inspect the state and statistics
about ElasticSearch clusters.
https://github.com/karmi/elasticsearch-paramedic
Plugin - Paramedic
Plugin - BigDeskLive charts and statistics for ElasticSearch cluster.
https://github.com/lukas-vlcek/bigdesk
Plugin - BigDesk
Disadvantages=> Uses lots of memory;=> No autowarming;
Interesting reading / referenceOfficial guidehttp://www.elasticsearch.org/guide/
Language Analyzershttp://www.elasticsearch.org/guide/reference/index-modules/analysis/lang-analyzer.html
Terms of endearment – the ElasticSearch Query DSL explainedhttp://www.elasticsearch.org/tutorials/2011/08/28/query-dsl-explained.html
Realtime Search: Solr vs Elasticsearchhttp://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/
The Ruby Toolbox - Elastic Searchhttps://www.ruby-toolbox.com/search?utf8=%E2%9C%93&q=elastic+search
Como adicionar consultas ultra-eficientes em grandes bases de documentoshttp://prezi.com/tdskmzuxflts/como-adicionar-consultas-ultra-eficientes-em-grandes-bases-de-documentos-com-elasticsearch/
Rails Castshttp://railscasts.com/episodes/306-elasticsearch-part-1http://railscasts.com/episodes/307-elasticsearch-part-2 (paid content)
Thank you!
Questions?