public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Fri Feb 29 16:38:52 -0800 2008
commit  14d66d6877688d4b4a9133fd3def7460effc2851
tree    ca9af61eefd6da230a6f42f5dec874658425c56d
parent  c1efe67d2285a3c5ea5fd5186d1f7936de0877a9
name age message
file .gitignore Thu Jan 24 19:12:53 -0800 2008 Ignore .gemspecs. [Josh Nichols]
file LICENSE Tue Feb 12 19:13:52 -0800 2008 Added names to license. Updated gem spec stuff. [Josh Nichols]
file Manifest Fri Feb 29 16:38:52 -0800 2008 A few more cleanups. [technicalpickles]
file README Mon Feb 18 17:04:54 -0800 2008 Better docs. [technicalpickles]
file Rakefile Fri Feb 29 16:38:52 -0800 2008 A few more cleanups. [technicalpickles]
directory config/ Thu Jan 24 19:11:00 -0800 2008 Imported ambitious sphinx. [Josh Nichols]
directory lib/ Fri Feb 29 16:38:52 -0800 2008 A few more cleanups. [technicalpickles]
directory test/ Mon Feb 18 16:42:41 -0800 2008 More rdoc. Added specs that sorting should fail. [technicalpickles]
README
= An Ambitious Sphinx Adapter

I don't know about you, but I like me some sexy full-text searching.

Want to find all meals that mention bacon?

  Meal.select {'bacon'}

What about bacon bits and sour cream?

  Meal.select {'bacon bits' && 'sour cream'}

Maybe with bacon in the name, or cheese in the recipe?

  Meal.select {|m| m.name =~ 'bacon' || m.recipe =~ 'cheese'}

Cheese in the name, but not grilled?

  Meal.select {|m| m.name =~ 'bacon' && m.name !~ 'grilled'}
  

== Big honking disclaimer

We're still learning a lot about how sphinx and ambition work, so things are likely to change a lot, and features are 
likely to be missing.

== Getting Started


=== Dependencies

You will need the following gems to use ambitious-sphinx:

  gem install ambition
  gem install ultrasphinx

=== Our stuff

We don't have a gem yet, so presumably you'll do a clone of our git repo. Then you need to install it:


  sudo rake install
  
=== Add it to your app
    
Require our files somewhere, like at the end of config/environment.rb, maybe create config/initializers/sphinx.rb

  require 'ultrasphinx'
  require 'ambition/adapters/ambitious_sphinx'
  
=== Sphinx and Ultrasphinx
    
You will also need to go through the motions of setting up ultrasphinx.

This includes:

 * Configuring/installing sphinx
 * Modifying your model to indicate what's to be indexed
 * Bootstrapping ultrasphinx
 
All this is discussed in detail in ultrasphinx's README

== Playing with the code base

In addition to the other dependencies, you'll need to:

  gem install echoe redgreen mocha test-spec
  
Run the tests with:
  
  rake test
  

== More information on Sphinx:

 -> http://www.sphinxsearch.com/
 -> http://blog.evanweaver.com/articles/2007/07/09/ultrasphinx-searching-the-world-in-231-seconds/
 -> http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html

== More information on Ambition:

-> http://ambition.rubyforge.org
-> http://groups.google.com/group/ambition-rb/