To edit pages or tickets please login with username/password: aaf/aaf

Ticket #193 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

AR::rebuild_index looses it's local index

Reported by: aaf Assigned to: jk
Priority: major Milestone:
Component: 0plugin Version:
Keywords: Cc:

Description

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 <except.c>: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: <No such file or directory> 

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

Change History

02/02/08 12:16:54 changed by jk

  • status changed from new to closed.
  • resolution set to fixed.

fixed in trunk, thanks!

To edit pages or tickets please login with username/password: aaf/aaf