Skip to main content
The userData object lets you store custom data in your index settings.

Usage

  • The object must be serializable as JSON.
  • You can store up to 32 kB. Larger objects may break your search.
  • To access previously stored userData, use the getSettings method.

Example

Current API clients

var response = await client.SetSettingsAsync(
  "ALGOLIA_INDEX_NAME",
  new IndexSettings
  {
    UserData = new Dictionary<string, object>
    {
      { "extraData", "This is the custom data that you want to store in your index" },
    },
  }
);
var extraData =  new Object { extraData= "This is the custom data that you want to store in your index"};
IndexSettings settings = new IndexSettings();
settings.UserData = extraData;

index.SetSettings(settings);