Ferret Indexing

Does ferret only index, when you create, or udpate a record?

Is there a way to make it index prexisting records?

Thanks.

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

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 P. 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

inline

On 7/19/06, Guest [email protected] 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.

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 P. wrote:

inline

On 7/19/06, Guest [email protected] 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.