search for: additional_models

Displaying 3 results from an estimated 3 matches for "additional_models".

2007 Oct 03
3
Pagination problem with acts_as_ferret
...query] || '''' @total, @user_profiles = UserProfile.multi_search(@query, [ WorkProfile, SchoolProfile ], :page => (params[:page]||1)) @pages = pages_for(@total) unless @query.blank? @results = UserProfile.find_by_contents @query end end model: def self.multi_search(q, additional_models = [], options = {}) return nil if q.nil? or q=="" default_options = {:limit => 1, :page => 1} options = default_options.merge options # get the offset based on what page we''re on options[:offset] = options[:limit] * (options.delete(:page).to_i-1) # n...
2006 Jul 21
3
segfaulting at rebiuild_index
...top segfaulting. Every time i run a query on my server (rails 1.1.4 and ferret .9.4 and aaf from svn) I get a segfault ./script/../config/../vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:243: [BUG] Segmentation fault this line is where the indx is rebuilt. " def rebuild_index(*additional_models) index = Ferret::Index::Index.new(ferret_configuration.merge(:create => true)) " I can get index = Ferret::Index::Index.new to run from the console. But, If i try the above from a model, Employee.rebuild_index, it segfaults. a fresh check out from the same svn repo on my lap...
2006 Apr 26
8
Search multiple models
Hello, Lets say you have a few models like Post, Article, Wiki, Comment, And you want to use ferret to search all of them at once. How would I set up the latest acts_as_ferret to accomplish this? And what would be fastest for searches? 1 index for all models, or have an index per model? Thank you -- Posted via http://www.ruby-forum.com/.