On Mon, Oct 09, 2006 at 03:27:34PM +0200, bbqTree wrote:
exactly does it handle when compared to the ferret tutorials that i
I don’t know what that IDX column should be good for, where did you read
about that ?
basically acts_as_ferret can handle everything for you. just call
acts_as_ferret in your model class definition, and you’ll get (besides
other goodies and methods for special use cases):
- automatic index creation for existing records
- new records are automatically added to the index
- automatic index updates, when you update your model data
- automatic removal of documents from the index when the corresponding
model object is destroyed.
- Model.find_by_contents(‘querystring’) to retrieve model instances
matching the querystring.
the acts_as_ferret method offers several options to customize the way
aaf works, i.e. which fields of your model should get indexed, and with
which indexing options (refer to the api docs at
- is there a complete tutorial online for acts_as_ferret plugin? so far
all the blogs that i came across pretty much say the same thing.
the API docs for the acts_as_ferret and find_by_content methods should
get you started. You might also want to check out the demo project from
the acts_as_ferret svn (see the wiki at
http://projects.jkraemer.net/acts_as_ferret/ for the repository url)
- does acts_as_ferret do this? if i specify acts_as_ferret to index
just title column in my ‘recipe’ table, and if someone types ‘bbq plate’
in the search box, will these recipes with the following title match?
“island bbq style plate”
“potato plate salad”
“my bbq plate”
since acts_as_ferret defaults to ANDed queries, only records 1 and 4
would match. you can however make aaf use ORed queries by specifying
:or_default => false in your call to acts_as_ferret.
if so, will the one with the most matching text like “my bbq plate” be
listed as #1?
I suppose it would be #1, not because the exact phrase matches, but
because it’s the most relevant hit (the overall size of the text is
smaller than that of the other document matching the query, and a match
in a short text generally scores higher than one in a large text).
Anybody please correct me if I’m wrong here.
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66