I'm having trouble figuring out how to do Ferret queries across multiple
tables as you would in a normal SQL call. For example, let's say I have
two ActiveRecord classes, Book, and Author, where Book has a
'description' field and Author has a 'name' field, and where Book has a
belongs_to relationship with Author (Book belolngs to Author, Author
has_many Books). Let's say I'd like to find all Books with the term
'programming' in their description that are by people with 'Smith' in
their name. I'd like to do something like this:
Book.find_by_contents("books.description:programming AND
authors.name:Smith",
{},
{:include => :author})
However, this function does not seem to allow the specification of table
names. This type of call would be relatively easy in plain SQL, but I'd
like to use Ferret for all queries to keep things uniform and to take
advantage of its speed. I've looked into using the multi_search option
also, but can't figure out how to use it to do even simple joins such as
this one. Any help would be greatly appreciated. Thanks.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk