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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Also, ferret is still working great in that other smaller model. Cheers, OA On Dec 26, 6:34 am, OA <ozata...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ian Zabel
2007-Dec-26 14:48 UTC
Re: Ferret OK in development, doesn''t work right in production.
Ferret is a bit finicky in production, mainly because you have to make sure that no one is using the system and updating/inserts data while it''s creating your index. If any data is modified while the index is being created, it will attempt to update the ferret index, and that''s not good. So you have to make sure no one else is using the system. In my production system, I didn''t fully shut production down, I just disabled creation of any new data during the initial indexing. It took like 6 hours to index everything. Then I put the app back to its normal state. Everything worked fine. However, the Ferret index frequently became corrupted and I''d have to reindex the whole database again. But that''s another issue entirely. On Dec 25, 11:34 pm, OA <ozata...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---