Forum: Ferret rebuild_index is returning {}

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
934f858e451cf9b771996b2940cd696b?d=identicon&s=25 Raj Singh (dorelal)
on 2007-02-05 14:26
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
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-02-05 15:00
(Received via mailing list)
On Mon, Feb 05, 2007 at 02:26:50PM +0100, Raj Singh 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 ;-)

--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
934f858e451cf9b771996b2940cd696b?d=identicon&s=25 Raj Singh (dorelal)
on 2007-02-05 16:13
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 Kraemer wrote:
> On Mon, Feb 05, 2007 at 02:26:50PM +0100, Raj Singh 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 ;-)
>
> --
> webit! Gesellschaft f�r neue Medien mbH          www.webit.de
> Dipl.-Wirtschaftsingenieur Jens Kr�mer       kraemer@webit.de
> Schnorrstra�e 76                         Tel +49 351 46766  0
> D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.