Does ferret only index, when you create, or udpate a record? Is there a way to make it index prexisting records? Thanks. -- Posted via http://www.ruby-forum.com/.
Hi guest, you are mixing up too different projects: ferret the searchengine library and acts_as_ferret which builds upon this library and provides a convienient way of integrating ferret into a rails project. To answer your question: Of course you are able to index existing records.>From a ferret perspective there is no difference between a new record(document in ferret terms) and existing ones. acts_as_ferret is indeed using the callback methods of activerecord but nonetheless it is able to build up an index from existing records. It''s default behaviour is to index the existing records if no index on a model that acts_as_ferret exists yet. Have a look at: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000007 Cheers, Jan On 7/19/06, Guest <guest at guest.com> wrote:> > Does ferret only index, when you create, or udpate a record? > > Is there a way to make it index prexisting records? > > Thanks. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20060719/3d25bf51/attachment.html
Right, acts_as_ferret. Here''s the deal, if I delete the existing index (the whole folder for the model), I get an error, and it doesn''t recreate the index. Isn''t it supposed to reindex with find(:all) if the index doesn''t exist? Thanks Jan. Jan Prill wrote:> Hi guest, > > you are mixing up too different projects: ferret the searchengine > library > and acts_as_ferret which builds upon this library and provides a > convienient > way of integrating ferret into a rails project. > > To answer your question: Of course you are able to index existing > records. >>From a ferret perspective there is no difference between a new record > (document in ferret terms) and existing ones. acts_as_ferret is indeed > using > the callback methods of activerecord but nonetheless it is able to build > up > an index from existing records. It''s default behaviour is to index the > existing records if no index on a model that acts_as_ferret exists yet. > Have > a look at: > http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000007 > > Cheers, > Jan-- Posted via http://www.ruby-forum.com/.
inline On 7/19/06, Guest <guest at guest.com> wrote:> > > Right, acts_as_ferret. > > Here''s the deal, if I delete the existing index (the whole folder for > the model), I get an error, and it doesn''t recreate the index.What kind of error is it you are getting? The maintainers of acts_as_ferret are reading on this mailing list and they might be interested in the error and may be able to help as well.. Isn''t it> supposed to reindex with find(:all) if the index doesn''t exist?Yes, this is at least my understanding of the API docs. Cheers, Jan Thanks Jan.> >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ferret-talk/attachments/20060719/6fabb111/attachment.html
Jan, My bad. I actually didn''t delete the whole directory for the model. Just the contents. It''s working great once I delete the directory. Thanks a lot. Jan Prill wrote:> inline > > On 7/19/06, Guest <guest at guest.com> wrote: >> >> >> Right, acts_as_ferret. >> >> Here''s the deal, if I delete the existing index (the whole folder for >> the model), I get an error, and it doesn''t recreate the index. > > > What kind of error is it you are getting? The maintainers of > acts_as_ferret > are reading on this mailing list and they might be interested in the > error > and may be able to help as well.. > > Isn''t it >> supposed to reindex with find(:all) if the index doesn''t exist? > > > Yes, this is at least my understanding of the API docs. > > Cheers, > Jan > > Thanks Jan.-- Posted via http://www.ruby-forum.com/.