There is Sphinx the search library, and then Sphinx the gem (which I didn't know existed until now). The gem is the 'official' Ruby API from Sphinx's source - an alternative to Riddle (which I developed and I feel is more ruby-like, though I look at it now and realise the interface is still a long way from what it could be).
So: ignore the Sphinx gem - it's not useful at all, and may get in the way. It hasn't been updated in two years. Sphinx the search engine is not Ruby, so it's not something you can manage via Bundler. The binaries 'indexer' and 'searchd' are provided as part of Sphinx, and they output their version whenever you run them - so in this case, 0.9.9. -- Pat On 29/11/2011, at 11:34 AM, alex wrote: > So weird... > > In production and dev, when I run "bundle list" I get: > * sphinx (0.9.10.2122) > * thinking-sphinx (2.0.10) > > (I'm also using RVM, but neither sphinx or thinking-sphinx appear when > I run "gem list") > > > And, when I ran "gem uninstall sphinx" in dev, and "bundle exec gem > uninstall sphinx" in production, I got: > "Successfully uninstalled sphinx-0.9.10.2122", as expected. > > > BUT, when I run "rake ts:index" in development, the log starts with: > "Generating Configuration to /Users/alex/Sites/xxx/config/ > development.sphinx.conf > Sphinx 0.9.9-release (r2117) > Copyright (c) 2001-2009, Andrew Aksyonoff" > > AND in production, "bundle exec rake ts:index RAILS_ENV=production" > gives me: > "Generating Configuration to /home/web-app/www/releases/20111129031512/ > config/production.sphinx.conf > Sphinx 0.9.8.1-release (r1533) > Copyright (c) 2001-2008, Andrew Aksyonoff" > > > I can't figure out why the right version number doesn't appear when I > index my data. Is it a bug in the output? or am I missing something? > > > On Nov 9, 5:57 pm, Pat Allan <[email protected]> wrote: >> Err, that's not the number I'm expecting. You've got 0.9.8.1 on your server >> (going by the indexing output)... >> >> -- >> Pat >> >> On 10/11/2011, at 12:55 AM, alex wrote: >> >> >> >> >> >> >> >>> yes, 0.9.10.2122 on both sides. >> >>> On Nov 8, 11:37 pm, Pat Allan <[email protected]> wrote: >>>> Hmm, right. Are you using the same version of Sphinx locally and on the >>>> production server? >> >>>> -- >>>> Pat >> >>>> On 09/11/2011, at 1:54 PM, alex wrote: >> >>>>> It worked fine on my local machine in my production environment. On my >>>>> local machine, I did the following: >>>>> 1. edited sphinx.yml file to: >> >>>>> development: >>>>> bin_path: /usr/local/bin >> >>>>> production: >>>>> bin_path: '/usr/local/bin' >>>>> port: 13003 >> >>>>> 2. "rake db:index RAILS_ENV=production" >>>>> 3. "rake db:start RAILS_ENV=production" >>>>> 3. "rails c production". In the console, I got the expected results: >>>>> "Movie.search(:with => {:author_ids => 6}, :per_page => 1000).count" >>>>> returned 25 >> >>>>> On Nov 8, 7:03 pm, Pat Allan <[email protected]> wrote: >>>>>> Given it works locally in dev, and you've got the same dataset there - >>>>>> can you try it locally with the production env? >> >>>>>> -- >>>>>> Pat >> >>>>>> On 09/11/2011, at 9:57 AM, alex wrote: >> >>>>>>> yes, other facets work fine (for instance, I have a "category" facet, >>>>>>> and I can filter by category in my movies search result -while author >>>>>>> filters do not appear-, and I have a view showing the movies per >>>>>>> category with a code similar to the one showing the movies by a given >>>>>>> author, that also work fine). >> >>>>>>> Here is the production output when I do "cap ts:index": >> >>>>>>> alex@machine:~/Sites/xxx:ruby-1.9.2@global: (master)$ cap ts:index >>>>>>> * executing `ts:index' >>>>>>> * executing "ls -x /home/web-app/www/releases" >>>>>>> servers: ["xxx.com"] >>>>>>> [xxx.com] executing command >>>>>>> command finished in 875ms >>>>>>> * executing "cd /home/web-app/www/releases/20111105041417 && bundle >>>>>>> exec rake ts:index RAILS_ENV=production" >>>>>>> servers: ["xxx.com"] >>>>>>> [xxx.com] executing command >>>>>>> ** [out :: xxx.com] Generating Configuration to /home/web-app/www/ >>>>>>> releases/20111105041417/config/production.sphinx.conf >>>>>>> ** [out :: xxx.com] >>>>>>> ** [out :: xxx.com] Sphinx 0.9.8.1-release (r1533) >>>>>>> ** [out :: xxx.com] Copyright (c) 2001-2008, Andrew Aksyonoff >>>>>>> ** [out :: xxx.com] >>>>>>> ** [out :: xxx.com] using config file '/home/web-app/www/releases/ >>>>>>> 20111105041417/config/production.sphinx.conf'... >>>>>>> ** [out :: xxx.com] indexing index 'movie_core'... >>>>>>> ** [out :: xxx.com] collected 1000 docs, 0.9 MB >>>>>>> ** [out :: xxx.com] collected 2000 docs, 1.9 MB >>>>>>> ** [out :: xxx.com] collected 2895 docs, 2.2 MB >>>>>>> ** [out :: xxx.com] collected 0 attr values >>>>>>> ** [out :: xxx.com] sorted 0.0 Mvalues, 100.0% done >>>>>>> ** [out :: xxx.com] sorted 0.0 Mvalues, 100.0% done >>>>>>> ** [out :: xxx.com] sorted 0.3 Mhits, 100.0% done >>>>>>> ** [out :: xxx.com] total 2895 docs, 2219208 bytes >>>>>>> ** [out :: xxx.com] total 3.212 sec, 690872.00 bytes/sec, 901.26 docs/ >>>>>>> sec >>>>>>> ** [out :: xxx.com] indexing index 'movie_delta'... >>>>>>> ** [out :: xxx.com] collected 0 docs, 0.0 MB >>>>>>> ** [out :: xxx.com] collected 0 attr values >>>>>>> ** [out :: xxx.com] sorted 0.0 Mvalues, nan% done >>>>>>> ** [out :: xxx.com] sorted 0.0 Mvalues, nan% done >>>>>>> ** [out :: xxx.com] total 0 docs, 0 bytes >>>>>>> ** [out :: xxx.com] total 0.016 sec, 0.00 bytes/sec, 0.00 docs/sec >>>>>>> ** [out :: xxx.com] distributed index 'movie' can not be directly >>>>>>> indexed; skipping. >>>>>>> command finished in 35429ms >> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Thinking Sphinx" group. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> To unsubscribe from this group, send email to >>>>>>> [email protected]. >>>>>>> For more options, visit this group >>>>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Thinking Sphinx" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]. >>>>> For more options, visit this group >>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en. >> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Thinking Sphinx" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group >>> athttp://groups.google.com/group/thinking-sphinx?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
