Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key words



On 20.03.2007, at 05:05, Miguel Muñoz wrote:

I want that the user adds a key words (tags) to an entity (this entity represent a document file description).

It heavily depends on what you are planning to do with that. What I've done is using a many-to-many relationship between a "tags" and and "objects_with_tags" table. To speed up performance in production I do the following: copy all tags in a single column in the "objects_with_tags" table in a way so that I can extract and display the tags from there without resolving the relationship. This is important when you show lists of objects with their tags because that would fire a lot a lot of faults when you display the tags.


For searching I used Lucene or the the integrated fulltext search in FrontBase (LookSee) on the desired columns. This works VERY well for an application with about 300k rows in the objects table and about 5000 tags.

For copying the tags into the "tags column" I use the "willInsert" and "willUpdate" methods of ERXGenericRecord (I use Wonder). Be careful when setting up relationships, especially back-relationships from tags to objects. That might blow your performance totally when this fires. Better to implement some cover methods for handling stuff.

cug _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Key words (From: Miguel Muñoz <email@hidden>)
 >Re: Key words (From: "Daniele Corti" <email@hidden>)
 >Re: Key words (From: Miguel Muñoz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.