public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Mon Feb 18 16:43:34 -0800 2008
commit  68437f4becda9392b8f50e7011a1d4f6505230ab
tree    08e9b7a87604d124eb2f9f3ebc6e2a6696d8f980
parent  235b70df3e2e54e0fe9b1977a0760b48c3b2f5a0
ambitious-sphinx / README
100644 66 lines (34 sloc) 1.676 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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.
 
### Getting Started
 
You will need the following gems to use ambitious-sphinx:
 
  gem install ambition
  gem install ultrasphinx
  
 
  Now install it as ambitious-sphinx:
 
    sudo rake install
    
  Require our files somewhere, like at the end of config/environment.rb
  
    require 'ambition/adapters/ambitious_sphinx'
    
  You will also need to go through the motions of setting up ultrasphinx. This includes setting up sphinx itself, and modifying your model to indicate what's to be indexed, and so on.
 
### Playing with the code base
 
In addition to the other dependencies, you'll need:
 
  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/