Hi, I just upgraded from acts_as_ferret 0.2/Ferret 0.9.x to acts_as_ferret 0.3/ferret .10.9, and i''m getting a strange behavior: searches are returning far too many results, most of them superflous. i''ll paste in my code below, it''s pretty simple. i''m googling like mad, and going through both the source and the forums, and having trouble finding what could be causing this. any help greatly apreciated. relevant code from our rails app: # search_array hold an array of the model we want to search search_array.each do |asset| a = Object.const_get(asset) assets << (a.find_id_by_contents q, :limit => num_docs, :offset => first_doc) end assets.flatten! return assets -- Posted via http://www.ruby-forum.com/.
answering myself here, but i "fixed" the problem by reverting to 0.10.1. would still love to know what was causing the problem with 0.10.9. i get weird errors when trying to use the AAf ''id_multi_search'' or ''multi_search'' methods, too, with either 0.10.1 or 0.10.9, fwiw. am including acts_as_ferret like so: acts_as_ferret :fields => [ :name, :description, :condition ], :store_class_name => true ferret and aaf are the bomb, though, generally. thanks for them both. -- Posted via http://www.ruby-forum.com/.
On Tue, Oct 10, 2006 at 10:58:38PM +0200, John wrote:> Hi, I just upgraded from acts_as_ferret 0.2/Ferret 0.9.x to > acts_as_ferret 0.3/ferret .10.9, and i''m getting a strange behavior: > > searches are returning far too many results, most of them superflous. > i''ll paste in my code below, it''s pretty simple. i''m googling like mad, > and going through both the source and the forums, and having trouble > finding what could be causing this. any help greatly apreciated. > > relevant code from our rails app: > > # search_array hold an array of the model we want to search > search_array.each do |asset| > a = Object.const_get(asset) > assets << (a.find_id_by_contents q, :limit => num_docs, :offset => > first_doc) > end > assets.flatten! > return assetshm, we''ll need some more information to help you out. What do your models look like, i.e. do you use single table inheritance or other ''special'' things ? providing some real data, a query, and the results your search returned would really help, too. cheers, Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66