public
Description: Ambition adapter for Sphinx
Clone URL: git://github.com/technicalpickles/ambitious-sphinx.git
Search Repo:
Better docs.
Mon Feb 18 17:04:54 -0800 2008
commit  2f1350285f55c6ea69b6dae00294d14fc183a1da
tree    2935c6296a5cd7dcd7d834a2a56a8dd95cd77c34
parent  68437f4becda9392b8f50e7011a1d4f6505230ab
0
...
1
2
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
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
...
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...
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
0
@@ -1,5 +1,4 @@
0
-An Ambitious Sphinx Adapter
0
-===========================
0
+= An Ambitious Sphinx Adapter
0
 
0
 I don't know about you, but I like me some sexy full-text searching.
0
 
0
0
0
0
0
0
0
0
0
0
0
0
0
@@ -20,32 +19,50 @@
0
   Meal.select {|m| m.name =~ 'bacon' && m.name !~ 'grilled'}
0
   
0
 
0
-### Big honking disclaimer
0
+== Big honking disclaimer
0
 
0
-We're still learning a lot about how sphinx and ambition work, so things are likely to change a lot.
0
+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.
0
 
0
-### Getting Started
0
+== Getting Started
0
 
0
+
0
+=== Dependencies
0
+
0
 You will need the following gems to use ambitious-sphinx:
0
 
0
   gem install ambition
0
   gem install ultrasphinx
0
-
0
 
0
- Now install it as ambitious-sphinx:
0
+=== Our stuff
0
 
0
- sudo rake install
0
+We don't have a gem yet, so presumably you'll do a clone of our git repo. Then you need to install it:
0
+
0
+
0
+ sudo rake install
0
+
0
+=== Add it to your app
0
     
0
- Require our files somewhere, like at the end of config/environment.rb
0
+Require our files somewhere, like at the end of config/environment.rb, maybe create config/initializers/sphinx.rb
0
+
0
+ require 'ultrasphinx'
0
+ require 'ambition/adapters/ambitious_sphinx'
0
   
0
- require 'ambition/adapters/ambitious_sphinx'
0
+=== Sphinx and Ultrasphinx
0
     
0
- 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.
0
+You will also need to go through the motions of setting up ultrasphinx.
0
 
0
-### Playing with the code base
0
+This includes:
0
 
0
-In addition to the other dependencies, you'll need:
0
+ * Configuring/installing sphinx
0
+ * Modifying your model to indicate what's to be indexed
0
+ * Bootstrapping ultrasphinx
0
+
0
+All this is discussed in detail in ultrasphinx's README
0
 
0
+== Playing with the code base
0
+
0
+In addition to the other dependencies, you'll need to:
0
+
0
   gem install echoe redgreen mocha test-spec
0
   
0
 Run the tests with:
0
0
@@ -53,13 +70,13 @@
0
   rake test
0
   
0
 
0
-### More information on Sphinx:
0
+== More information on Sphinx:
0
 
0
  -> http://www.sphinxsearch.com/
0
  -> http://blog.evanweaver.com/articles/2007/07/09/ultrasphinx-searching-the-world-in-231-seconds/
0
  -> http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html
0
 
0
-### More information on Ambition:
0
+== More information on Ambition:
0
 
0
 -> http://ambition.rubyforge.org
0
 -> http://groups.google.com/group/ambition-rb/
...
1
2
3
4
5
6
 
 
7
8
9
...
1
2
3
 
 
 
4
5
6
7
8
0
@@ -1,9 +1,8 @@
0
 module Ambition #:nodoc:
0
   module Adapters #:nodoc:
0
     module AmbitiousSphinx #:nodoc:
0
-
0
- # Responsible for taking the clauses that Ambition has generated, and ultimately doing a
0
- # Ultrasphinx::Search based on them
0
+ # Responsible for taking the clauses that Ambition has generated,
0
+ # and ultimately doing a Ultrasphinx::Search based on them
0
       class Query < Base
0
         def kick
0
           Ultrasphinx::Search.new(to_hash).results

Comments

    No one has commented yet.