I have a legacy database I'm working with structured as follows, where
the name and content for one thing is split into two separate tables:
A (table)
:name
:B (a foreign key)
B (table)
:content

I've currently got A indexed by Thinking Sphinx on :name, but I'd like
to also index on :content.  How can I structure things so that a query
against A will search across both the contents of :content as well
as :name?

When I just use
indexes B
I now have an index of numbers rather than of the actual content
itself, which isn't too useful for searching.

When I take the direct approach of telling Rails
belongs_to :B, :foreign_key => :B
and
indexes B.content
that doesn't work with the Sphinx.  However, basic Rails functionality
does work, like being able to go a.b.content to see the content.

Is there any way to do this without having to modify the legacy
databases themselves?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to