public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Mon Feb 18 17:04:54 -0800 2008
commit  2f1350285f55c6ea69b6dae00294d14fc183a1da
tree    2935c6296a5cd7dcd7d834a2a56a8dd95cd77c34
parent  68437f4becda9392b8f50e7011a1d4f6505230ab
ambitious-sphinx / README
100644 83 lines (43 sloc) 1.982 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
= 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/