• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Buscas Poderosas Com Solr
 

Buscas Poderosas Com Solr

on

  • 6,665 views

Apresentação no devinsampa

Apresentação no devinsampa

Statistics

Views

Total Views
6,665
Views on SlideShare
6,149
Embed Views
516

Actions

Likes
4
Downloads
62
Comments
0

2 Embeds 516

http://manifestonaweb.wordpress.com 496
http://www.slideshare.net 20

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Buscas Poderosas Com Solr Buscas Poderosas Com Solr Presentation Transcript

  • Ricardo Almeida - Gonow Buscas Poderosas com Solr
  • Quem sou?
  • Solr • Engine de Busca • Open Source (Apache) • Baseado no Lucene • Java Servlet container (Jetty) • XML/HTTP e JSON APIs • Faceted Search, caching, replicação. • Web adm Interface
  • Lucene • Full Search Text • Search and Index (Busca Index ao invés de textos) • Document (Unidade de Pesquisa e Index) • Fields • Queries
  • acts_as_taggable_on • script/plugin install git://github.com/mbleigh/acts-as-taggable-on.git • script/generate acts_as_taggable_on_migration • rake db:migrate
  • Solr - Atributos Dinâmicos DynamicAttribute.new :name => “hora_extra”, :value => “A definir”
  • Solr - Atributos Dinâmicos • script/generate dynamic_attributes_migration • rake db:migrate
  • Solr - Geo-Distância
  • Solr - Geo-Localização • script/generate local_migration • rake db:migrate
  • Integrando Solr e plugin acts_as_solr com Rails (5 min)
  • Requerimentos: Java Runtime Environment (JRE) 5.0 Passos: 1. Criar aplicação Rails 2. Instalar plugin acts_as_solr_reloaded script/plugin install git://github.com/ricardoalmeida/acts_as_solr_reloaded.git 3. Criar um modelo Palestrante 5. Executar a migração 6. Editar o modelo 7. rake solr:start http://0.0.0.0:8982/solr/admin 8. Usar o script/console
  • Acts_as_solr • query = “Palestrante devinsampa” • palestrante.find_by_solr(query, options) • palestrante.search(query, options) • evento.palestrantes.search(query)
  • Por que Solr? • JVM
  • Por que Solr? • JVM • Performance /Cache / Replicação
  • Por que Solr? • JVM • Performance /Cache / Replicação • Usa Lucene
  • Por que Solr? • JVM • Performance /Cache / Replicação • Usa Lucene • Boa integração com Rails
  • Performance de Indexação • multithread / multiprocessos • solrconfig.xml
  • Performance de Busca • Index Otimizado • Cache tuning (solrconfig.xml) • Replicação de Busca
  • Por que Solr? Acts_as_solr Sphinx Acts_as_ferret
  • Sai Sphinx entra Solr
  • Acts_as_solr X Sphinx • Acts_as_solr trabalha com Sqlite3 e Sphinx exigia Mysql • Acts_as_solr indexa documento no after_create • Atributos Dinâmicos • Faceting e Geo-localizacao
  • acts_as_taggable_on • script/plugin install git://github.com/mbleigh/acts-as-taggable-on.git • script/generate acts_as_taggable_on_migration • rake db:migrate
  • Solr - Faceting • Número de vezes que um termo aparece em um documento
  • Lucene - Relevance :tag => 0 :nome => 2 Palestrante.search “Ricardo” palestrante1.tag_list = “Ricardo” palestrante2.nome = “Ricardo”
  • Lucene - Query Parser Sintaxe • title:ipod* AND price:[0 TO 100]
  • Testes • rake solr:start RAILS_ENV=test • Porta 8981
  • Por que reloaded? • Plugin de Thiago Jackiw (http://www.railsfreaks.com/) • acts_as_solr_reloaded de Diego Carrion (www.mouseoverstudio.com)
  • Por que reloaded? • Solr 1.4 • Geo-Localização • Relevance • Highlighting
  • Novas Features (Meu fork) • Migrate para DynamicAttribute e Local • DynamicAttribute e Local internos
  • Lucene • WhitespaceAnalyser • StopAnalizers • SynonymAnalyser • I18n (Internacionalização)
  • http://www.workingwithrails.com/person/17033-ricardo-almeida
  • Agradecimentos
  • Referências • http://www.mouseoverstudio.com/blog/2009/08/27/sai-sphinx-entra-solr- actsassolrreloaded/ • http://github.com/mbleigh/acts-as-taggable-on/tree/master • http://github.com/dcrec1/acts_as_solr_reloaded/tree • http://lucene.apache.org/solr/ • http://wiki.apache.org/solr/ • http://lucene.apache.org/solr/tutorial.html • http://github.com/jeveaux/aprendendo-solr/tree/master/solrServer/ • http://solrjs.solrstuff.org/test/reuters/ • http://www.lucenetutorial.com/
  • Duvidas? http://manifestonaweb.wordpress.com @almeidaricardo http://visaoagil.wordpress.com www.infoq.com/br
  • Obrigado!