We index properties for products that vary from product to product. For instance, a shoe could have a color field with values of red, blue and green. It would also have a size field with 3,4,5,6,7,8,9,10 for values. Another product could be a car with transmission field with values automatic and manual. I index all the properties into their own field as well as dump them into another generic field for searching.
In the database we have a property_types table where size, color, and transmission go. Then there is a many to many table from that to the products table that holds the acutal values of those properties (e.g. automatic, manual, red, green, 8, 9, etc.) I hope that helps explain it. -Lee On 6/6/06, Marvin Humphrey <[EMAIL PROTECTED]> wrote: > > On Jun 6, 2006, at 10:11 AM, Lee Marlow wrote: > > > Do you mean that all fields would have to be known at index creation > > time or just that once a field is defined it properties are the same > > across all documents? Right now I'm indexing documents that create > > new fields as needed based on user defined properties, so we don't > > know all the fields initially. > > How would you handle this if you were using an SQL database rather > than Ferret? Your app wouldn't be able to modify the table on the > fly on that case, unless you did something insane like run a remote > "ALTER TABLE" command. > > Marvin Humphrey > Rectangular Research > http://www.rectangular.com/ > > _______________________________________________ > Ferret-talk mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/ferret-talk > _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

