public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Fri Feb 29 16:19:36 -0800 2008
commit  753416af4550d0bc834f7891526e128d16c116d6
tree    04f695b5f7a0f280f6006af27dc68f599e0de575
parent  c1588c2424dbf9b47f16ef40bde58d34ce0ac6a6
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/