David Sheldon wrote: > How much overhead would it be to write an "add_value" method that is > called, say 10 times per doc, which will lookup the field we're going to > add in the index, and add it if it isn't already there?
Ok, I've done this. But it was causing problems when called from rebuild_index, as there isn't an index at that point, and I was calling ferret_index on my model, which was creating a new index which couldnt get a write lock for my new fields. I have solved this by giving to_doc an optional index parameter that is passed in when rebuild is running, but if it is nil, it will call Model.ferret_index. It seems like an incorrect separation for the index to be passed in to the to_doc method. Have you any suggestions on how to make this nicer? David -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

