Rebuild_index is returning {}


#1

Previously when I used to build index i used to get false in return.

Event.rebuild_index
=> false

Now I get this.

Event.rebuild_index
=> {}

Following changes took place.

  1. I moved my app from FCGI to mongrel.
  2. I moved my app to capistrano.

Before moving to capistrano the code was
acts_as_ferret :fields => [ “name”, “desc_uf” ]

Now the code is
acts_as_ferret :fields => [ “name”, “desc_uf” ],:index_dir =>
“/home/dorelal/apps/eii_#{RAILS_ENV}/shared/ferret”

My question is this:
Now that I do Event.rebuild_index I get {} in return. Is that okay? Or
does that mean something is wrong somewhere?

Thanks


#2

On Mon, Feb 05, 2007 at 02:26:50PM +0100, Raj S. wrote:

My question is this:
Now that I do Event.rebuild_index I get {} in return. Is that okay? Or
does that mean something is wrong somewhere?

As of now, the return value of rebuild_index does not mean anything and
has changed between aaf versions. In 0.3.0, index.close() was the last
call
in the method, in 0.3.1 it’s been an assignment to Hash.new, so {} looks
like
a correct return value for this version.

However I don’t see how the return value should change from false to {}
without switching the aaf version.

Jens

PS: I promise to set the return value of rebuild_index to something
meaningful (maybe the number of records indexed?) in future versions, as
people really seem to pay attention to it :wink:


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer removed_email_address@domain.invalid
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66


#3

You are right. I upgraded aaf too. Not sure what the earlier version was
but when I upgraded I got ‘svn revision 132’ for aaf.

Sorry I should have mentioned that.

Thanks

Jens K. wrote:

On Mon, Feb 05, 2007 at 02:26:50PM +0100, Raj S. wrote:

My question is this:
Now that I do Event.rebuild_index I get {} in return. Is that okay? Or
does that mean something is wrong somewhere?

As of now, the return value of rebuild_index does not mean anything and
has changed between aaf versions. In 0.3.0, index.close() was the last
call
in the method, in 0.3.1 it’s been an assignment to Hash.new, so {} looks
like
a correct return value for this version.

However I don’t see how the return value should change from false to {}
without switching the aaf version.

Jens

PS: I promise to set the return value of rebuild_index to something
meaningful (maybe the number of records indexed?) in future versions, as
people really seem to pay attention to it :wink:


webit! Gesellschaft f�r neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Kr�mer removed_email_address@domain.invalid
Schnorrstra�e 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66