What is AttributesToRetrieve? And unretrievableAttributes?

AttributesToRetrieve and UnretrievableAttributes are two features designed to control which information Algolia will send in the answer of a search query.

1/ AttributesToRetrieve
By default, Algolia will return all attributes of the object in the JSON answer of a search query, the attributesToRetrieve query parameter let's you specify which attributes you want, and we'll only send these. This feature is designed to reduce the size of the answer sent by Algolia, to reduce the network latency and make the search faster.
2/ UnretrievableAttributes
If you have an attribute that you don't want to be accessible (e.g. the number of sales of a product), you can specify it in unretrievableAttributes. We'll never include this attribute in the JSON answer of a search query.The only exception: if you use your Master API Key (shouldn't be used for the search anyway), we'll ignore the unretrievableAttributes restrictions.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk