Hi, I am trying to create a search feature that queries multiple tables, and returns results from all tables in a single paginated query, kind of like the search feature on facebook. I was wondering if there are any good ways to do this. Thanks Bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This may depend on the actual number of tables to search, and on the kind of search. If it''s only two or three, I would go for ActiveRecords :join or :include If that gets too complicated I would use pure SQL. Another option would be a search engine like sphinx. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks. I just gave ultrasphinx a try, and it looks promising. I''m also considering looking into solr. Do you have any advice as to how the two stack up? Thanks again! On Nov 11, 2:08 am, Thorsten Müller <thors...-1oxKqHKwyltBDgjK7y7TUQ@public.gmane.org> wrote:> This may depend on the actual number of tables to search, > and on the kind of search. > > If it''s only two or three, I would go for ActiveRecords :join > or :include > If that gets too complicated I would use pure SQL. > Another option would be a search engine like sphinx.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---