Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SOLR and Rails

SOLR and Rails

Quick overview of SOLR usage in Rails. Presented to Montreal on Rails on September 2nd 2008.

Hugo Frappier

May 14, 2012
Tweet

More Decks by Hugo Frappier

Other Decks in Technology

Transcript

  1. :full_text_search • Not relying on SQL statements • Searching using

    multiple words in any order • Stemming considerations (derived words) • Results weighting • Grouping (faceting)
  2. :options • MySQL queries (‘like ?’, “%#{text}%”) • Ferret •

    Sphinx / UltraSphinx • Xapian (new) • SOLR
  3. acts_as_solr • Based on the Lucene indexing and searching engine,

    a free/open source libray that was originally created in Java. • http://en.wikipedia.org/wiki/Lucene • Plugin, not a gem (yet) • http://github.com/railsfreaks/acts_as_solr/ tree/master
  4. :flow Filter 1 The quick brown fox jumps over the

    lazy dog Filter 2 Filter n Full Text Search Engine and Data Store quick brown fox jump over lazi dog Filter 1 Filter 2 Filter n fox jump dog id: 5 port 8982 tip.save() Tip.find_by_solr (‘foxes jumps dog’) Rails App Rails App Rails App
  5. :resources • http://wiki.rubyonrails.org/rails/pages/Acts+as+Solr+Plugin • http://enjoyingrails.files.wordpress.com/2008/04/adding-full- text-search-to-your-rails-app.pdf • http://www.quarkruby.com/2007/8/12/acts_as_solr-for- search-and-faceting •

    http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters • http://www.xml.com/pub/a/2006/08/09/solr-indexing-xml- with-lucene-andrest.html?page=3 • Advanced Rails Receipes: Recipe 11: Faceted Search with