Hello!,I am confused with the thinking_sphinx index
I have some models,there are Bill ,LineItem and product
Bill has_many :line_items
LineItem has_one :product
the Product have two attributes: number and name
example:
bill.line_items.first.product.number = "product"
I want to find the this bill with the key word "product"
how to define the index?
Thanks!
ps:Hope you can understand me,my English is poor.
Place this in Bill model:
Now you can search like this: