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 -- Posted via http://www.ruby-forum.com/.
On Mon, Feb 05, 2007 at 02:26:50PM +0100, Raj Singh wrote:> 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?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 at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
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 at webit.de > Schnorrstra?e 76 Tel +49 351 46766 0 > D-01069 Dresden Fax +49 351 46766 66-- Posted via http://www.ruby-forum.com/.
Maybe Matching Threads
- Typo and acts_as_ferret rebuild_index errror
- Errror on update after Model.rebuild_index
- acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
- Advise on slowness in bootstrapping?
- [ActsAsFerret] OpenSolaris (TextDrive) indexing issues