I''m having a weird problem. Recently, on all my environments, one of my two indexed models is not returning any results to acts_as_ferret. However, the folder is being created for it and Im not receiving any errors. On my two models, I call the following: Book.rebuild_index User.rebuild_index When I call those commands through either my live app "ruby script/server" or through the console "ruby script/console," it works fine and I can search on the Book model. However, when I run those exact commands through a rake task (with :environment set), it creates the indexes successfully, but it will return NO results for the Book model. However, User will continue to work. Looking in the log files, it shows that the rebuilds were successful. Im guessing there is some kind of linking problems here. Anyone have any suggestions? Thanks in advance. - Aryk -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jul-25 09:40 UTC
[Ferret-talk] Ferret indexing problem through rake tasks
Hi! On Mon, Jul 23, 2007 at 10:07:06PM +0200, Aryk Grosz wrote:> I''m having a weird problem. Recently, on all my environments, one of my > two indexed models is not returning any results to acts_as_ferret. > However, the folder is being created for it and Im not receiving any > errors.Did you change anything in your setup before this started happening (maybe an aaf upgrade)? What version of aaf do you use?> On my two models, I call the following: > > Book.rebuild_index > User.rebuild_index > > When I call those commands through either my live app "ruby > script/server" or through the console "ruby script/console," it works > fine and I can search on the Book model. > > However, when I run those exact commands through a rake task (with > :environment set), it creates the indexes successfully, but it will > return NO results for the Book model. However, User will continue to > work. Looking in the log files, it shows that the rebuilds were > successful. Im guessing there is some kind of linking problems here.When you say aaf creates the indexes successfully, does that mean that you checked them with plain Ferret and could retrieve documents from the books index? cheers, Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa