Hi all,
I am developing my app on OS X and deploying regularly to a linux box
that I’ve got running on CentOS. I recently started using
acts_as_ferret on one of my simple models and it has been doing great.
Last night, I tried implementing it for a more heavily used model and
I ran into a strange problem.
On my development mac, everything works great. I included 2 fields,
deleted the index folder, implemented the pagination functions as
suggested in the famous tutorial:
http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial
, sat back and tested my new full text search engine with great
pleasure and satisfaction.
My production ferret_server configuration was already in place since I
have been using it for another model. I just deployed using
capistrano, deleted the index directory and waited for the new model
to build its index - which took a while due to the large number of
rows.
Then when I tried using the search function, I got very few, if any
results. Interestingly, pagination still predicted several pages
where I could not see any results. I’ve been working at it for hours
and I think I ruled out any common, stupid mistakes. Again, what’s
interesting is that the exact same code is doing wonders on my laptop.
I know it’s kind of a shot in the dark but I would appreciate any
input. Let me know if I can answer any questions.
Best,
OA
Note: My indexed fields contain non-English UTF-8 encoded entries. I
set the LANG environment variable to en_US.UTF-8 in environment.rb.