-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I noticed that some of our users, for example meilisearch.com, had large documents but only needs one or two fields.
For example in the case of meilisearch.com we are querying this very large JSON TWICE when all we need is actually the two selected fields;
It would be cool if instant-meilisearch was able to detect which fields are used (but I highly doubt that's possible) or if we could specify ourselves the attributesToRetrieve
, attributesToHighlight
and attributesToCrop
settings.
Basic example
instantMeiliSearch(
process.env.NEXT_PUBLIC_DEMO_MOVIES_HOST,
process.env.NEXT_PUBLIC_DEMO_MOVIES_API_KEY,
{
paginationTotalHits: 4,
primaryKey: 'id',
attributesToRetrieve: ["poster_path"],
attributesToHighlight: ["title"],
}
)
Other
To give you an idea, on meilisearch.com that would make the size of each request goes from 23675 bytes to 980.
brunoocasali
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working