Api reference icon

unretrievableAttributes

unretrievableAttributes

scope settings
type array of strings
default []
description

List of attributes that cannot be retrieved at query time.

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.

Examples

Make some attributes unretrievable

<?php
$index->setSettings([
  'unretrievableAttributes' => [
    "total_number_of_sales"
  ]
]);
index.set_settings({
  unretrievableAttributes: [
    "total_number_of_sales"
  ]
})
index.setSettings({
  unretrievableAttributes: [
    'total_number_of_sales'
  ]
});
index.set_settings({
    'unretrievableAttributes': [
        "total_number_of_sales"
    ]
})
index.setSettings([
    "unretrievableAttributes": [
        "total_number_of_sales"
    ]
])
index.setSettings(new JSONObject().put("unretrievableAttributes",
    new JSONArray().put("total_number_of_sales")));
index.SetSettings(
  JObject.Parse(@"{""unretrievableAttributes"":[""total_number_of_sales""]}")
);
index.setSettings(
  new IndexSettings().setUnretrievableAttributes(Arrays.asList(
    "total_number_of_sales"
  ))
);
res, err := index.SetSettings(algoliasearch.Map{
    "unretrievableAttributes": []string{
        "total_number_of_sales",
    },
})
client.execute {
  changeSettings of "myIndex" `with` IndexSettings(
    unretrievableAttributes = Some(Seq(
      "total_number_of_sales"
    ))
  )
}