views:

44

answers:

2

I installed act_as_ferret plugin according to this tutorial http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret. However I'm not seeing any results.

When I dug further, here is what I see in my act_as_ferret log file link text

I'm guessing for some reason its not indexing properly. I deleted my index file couple times and still nothing. Any help is appreciated. Thanks

A: 

well brother... i'm here to say two things that may make your day. One is to seriously consider Thinking Sphinx. I've had a blog post that got wiped out regarding that post, as i used it for like 2 years (aaf and shared indexes). Thinking sphinx is more 'better'.

unless you can do one, then i assume you are forced to use aaf. i suggest it has to do with how you are starting/stopping the ferret server.

Here is what worked for me, as it is literally magic...

  1. stop the ferret server
  2. Restart passenger/mongrel
  3. start the ferret server
  4. do a search in your app (actually search for something and hit submit)
  5. Delete the /index directory, like all of it
  6. Do another search and it should work

Lame as it is, just remember that Thinking Sphinx is capable of doing what you want with shared indexes.

pjammer
I heard Sphinx involves me manually updating the index?
Senthil
with the new TS or sphinx (i forget exactly which one) but it does away with it, so SOON that won't be a concern. also there are ways around it. did you try the steps i suggested above? i know it seems weird, but honestly that is all that held me back. I also assume you have no errors and that the index is getting generated when you search, right?
pjammer
I decided to try out Thinking Sphinx as per your suggestion, for some reason I can't start the server any more with act as ferret.
Senthil
i'm 99% sure i can start both ferret and TS on the same machine. I've never tried starting both in the same app however, so i'm not sure what you are mentioning there, or what you mean by 'can't start the server' (assuming ferret server).
pjammer
A: 

Did you try rebuilding the Ferret index?

$ export RAILS_ENV=production
>> ./script/console
>> Product.rebuild_index

Replace Product with your Model name.

Pete