Closed drougojrom closed 4 years ago
Sorted it out :)
What did you do?
What did you do?
that's pretty easy
ThinkingSphinx::Index.define :book, with: :active_record do
# fields
indexes book_subscriptions.territories.code, as: :code, type: :string
end
Hey guys!
Thank you very much for that project, but I wonder if it supports search with join tables.
For example, I've got a Book object, which has_many :business_models Then each BusinessModel has_many :territories, they have a related table as well, each territory has a code value inside
Basically, I want to write a sphinx_scope, which will allow to do the following:
The issue is that I'm not sure where to find the docs for such join example I was trying to mimic the AR request, which looks like that
but no luck so far.
Would really appreciate your help!