I followed itay-grudev tutorial.
It worked as well. and then i wanna scale this demo. Create a new model, Search cross mutil models.
And now i have two Models. Article and Post
mapping do # ... end
def self.search(query) # ... end
But i dont know how can i call field of Article and Post in mapping of Searchacle
How about if Article and Post models have same field is "title"
And in controller. i read guide in github offical page. If you wanna search cross multil models you must using syntax:
@results = Elasticsearch::Model.search('fox', [Article, Post]).records.to_a
But i wanna to use search method in Searchable module. How can i change it. I tried to read guide but nowhere clearly so i came here
Sorry for my bad english. Hope everyone can help me. Thanks you so much!