As stated in the title, I'm looking for the tankit
index method in my model that allows for indexing for a Post's User. In my model I have:
tankit 'idx' do
indexes :title
indexes :content
indexes :post_loc
indexes :user_id
end
However, this only allows for searching the user's id. Which is not what I want. All users have a username and I'd like to be able to search by that to display all of the reports by that user. I would like to do something like indexes :(User.find(user_id).username)
or something along that line but that does not work.
Assuming you have an association named 'user', you need to add this kind of method to index values of associations:
You can even map multiple values for one to many associations: