#45 ✓resolved
Jens

AR::rebuild_index looses it's local index

Reported by Jens | February 13th, 2010 @ 12:38 AM

I am rebuilding Ferret indexes in setup() in tests and I've noticed that Ferret fails sometimes after that.

 
Ferret::FileNotFoundError (File Not Found Error occured at :117 in xpo
p_context
Error occured in fs_store.c:329 - fs_open_input
        tried to open "/home/sergei/NetBeansProjects/ims/config/../index/test/cl
assified/_8_0.del" but it doesn't exist:  

I've traced it to [[ActsAsFerret]]::ClassMethods::rebuild_index method. The bug is caused incorrect index_dir assignment.

Here's patch:

Index: class_methods.rb
--- class_methods.rb Base (BASE)
+++ class_methods.rb Locally Modified (Based On LOCAL)
@@ -31,7 +31,7 @@

 def rebuild_index(*models)
   models << self unless models.include?(self)
   aaf_index.rebuild_index models.map(&:to_s)


  • index_dir = find_last_index_version(aaf_configuration[:index_base_dir]) unless aaf_configuration[:remote]
  • self.index_dir = find_last_index_version(aaf_configuration[:index_base_dir]) unless aaf_configuration[:remote] end

    # re-index a number records specified by the given ids. Use for large



Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages