Description
How difficult would it be to support selecting specific attributes only when loading models after a search.
Basic example
I'm imaging an option of ms_search that accepts a list of attributes to be selected.
e.g. Service.search("query", select: [:name, :slug])
For example, I've started using Meilisearch for autocomplete of products in SaaSHub. The model I'm searching has quite a few attributes (some of them big), and we only need the "name" & "slug" of that product.
i.e. without this feature/option, the server is loading (and deserializing) a dozen big models on every keystroke. At the same time, it's only the name and slug that are necessary.
Description How difficult would it be to support selecting specific attributes only when loading models after a search.
Basic example I'm imaging an option of
ms_search
that accepts a list of attributes to be selected.e.g.
Service.search("query", select: [:name, :slug])
For example, I've started using Meilisearch for autocomplete of products in SaaSHub. The model I'm searching has quite a few attributes (some of them big), and we only need the "name" & "slug" of that product.
i.e. without this feature/option, the server is loading (and deserializing) a dozen big models on every keystroke. At the same time, it's only the name and slug that are necessary.