setUnRetrievableAttributes method

AlgoliaQuery setUnRetrievableAttributes(
  1. List<String> value
)

UnRetrievableAttributes

List of attributes that cannot be retrieved at query time.

You may want to ensure that under no circumstance should a particular set of attributes be returned. This is particularly important for security or business reasons, where some attributes are used only for ranking or other technical purposes, but should never be seen by your end users, for example, total_sales, permissions, and other private information. This setting guarantees

Usage notes:

  • These attributes can still be used for indexing and/or ranking.
  • This setting is bypassed when the query is authenticated with the admin API key.

Source: Learn more

Implementation

AlgoliaQuery setUnRetrievableAttributes(List<String> value) {
  assert(value.isNotEmpty, 'value can not be empty');
  assert(!_parameters.containsKey('unretrievableAttributes'));
  return _copyWithParameters(
      <String, dynamic>{'unretrievableAttributes': value});
}