Your SlideShare is downloading. ×
0
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
ElasticSearch, Elastica, ElasticaBundle
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

ElasticSearch, Elastica, ElasticaBundle

6,187

Published on

Elastica and ElasticaBundle in Symfony2 architecture

Elastica and ElasticaBundle in Symfony2 architecture

Published in: Technology
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,187
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
2
Comments
0
Likes
12
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ElasticaElasticaBundle Nicolas Badey CTO - Yoopies
  • 2. ElasticSearch• Raised 10M$ in November 2012• First version in February 2010 after Compass was dropped• Competitors : - Solr - Sphynx
  • 3. ElasticSearch• “Distributed, RESTful, Search Engine built on top of Apache Lucene”• Schema-less• JSON• Java (Netty/Spatial4j)• Easy to install : dpkg –i elasticsearch.deb• Usage : Alternative Data Storage or/and Search Index
  • 4. Features• Boost (scoring)• Analyzers• GeoLocation• Facets• Highlighting• Scripting : MVEL/Java/Javascript /Groovy/Python• Percolator (Prospective Search)• Cache• Plugin (attachment type, Twitter River …)
  • 5. Why ElasticSearch ?• Very fast• Document != Data Model• Doctrine Mapping/Listener• Advanced search functionalities
  • 6. Searchcurl -XGET http://localhost:9200/[INDEX]/[TYPE]/_search -d ‘{ "query": { "query_string": { "query": "foobar" } }, "filter": { "numeric_range": { "price": { "lte": 42 } } }, "sort": { "created_at": { "order": "desc" } }}’
  • 7. Elastica• v0.19.8.0 => PHP 5.2• v0.20.5.0.RC1 => PHP 5.3 / PSR 0-1-2
  • 8. ElasticaBundle• Persistence automatic provider, Doctrine/Propel/MongoDB• Pagination, PagerFanta / KNPpaginator• Service : Client Index Type Finder• Persistence listener CallBack (only Doctrine)• Custom Doctrine query builder• Custom Provider• Custom Elastica To Model Transformer/Model To Elastica Transformer• Exercise / FOQElasticaBundle => FriendsOfSymfony/FOSElasticaBundle
  • 9. Mapping
  • 10. Mapping
  • 11. Filter vs Query• Filter - cached - speed• Query - scoring
  • 12. Cache• Filter (recommended)• Node• Index• Filter Cache is active by default for most of them• $filter->setCached(true);
  • 13. ScriptFilter• Computed distance• Custom Scoring : “_score * doc[my_numeric_field].value / pow(param1, param2)”
  • 14. Highlight• Implement HighlightableModelInterface for model
  • 15. Facets• Terms, Range, Histogram, Filter, Query, Statistical, Terms Stats, GeoDistance …
  • 16. Data Transformer• ElasticaToModel Transformer• ModelToElastica Transformer
  • 17. _search _percolator FormA FormB Entity Search Search ModelA ModelB Model ToElastica ElasticaQuery Factory Document Percolator Query Percolator Elastica Finder TypeToModel Array (match) Response Entities Set
  • 18. PercolatorRegisterMatch
  • 19. Annexes• https://github.com/FriendsOfSymfony/FOSElasticaBundle• http://richardmiller.co.uk/• http://www.elasticsearch.org/• https://github.com/sonian/elasticsearch-jetty• http://www.elasticsearch.org/tutorials/javascript-web-applications-and- elasticsearch/• http://www.elasticsearch.org/tutorials/using-elasticsearch-for-logs/• http://blog.sematext.com/2012/08/23/solr-vs-elasticsearch-part-1- overview/

×