meilisearch-rails
meilisearch-rails copied to clipboard
Add a scope parameter to eager load matched records
Description It would be nice if this gem could to eager load relations of matched records
class Book
scope with_author: -> { includes(:author) }
end
Book.search('Harry Potter', scope: :with_author)
I would add an optional scope parameter and used it here to load relations https://github.com/meilisearch/meilisearch-rails/blob/main/lib/meilisearch-rails.rb#L653