The manual states this (https://github.com/ankane/searchkick#nested-data):
Nested Data
To query nested data, use dot notation.
User.search "san", fields: ["address.city"], where: {"address.zip_code" => 12345}
This simply doesn't work or the example given needs more qualification.
In my case I have ExpenditureItem
which belongs_to: Expenditure
so I try this:
ExpenditureItem.search("*", where: { "expenditure.budget_id": '2'})
which results in nothing. I know in my search_data
I can set:
budget_id: expenditure.budget_id
but from the example it seems the entire point is to be able to complete quick and easy nested searches.
Am I missing something here?