Skip to main content
The disablePrefixOnAttributes parameter turns off prefix matching for the specified attributes. This is useful when you want to ensure only full-word matches are allowed—for example, in attributes like SKUs, phone numbers, or serial codes—where partial matches could produce irrelevant results. For more information, see Prefix searching by attribute.

Usage

There’s no hard limit on the number of attributes you can include, but adding too many can slow down getSettings operations and degrade performance in the Algolia dashboard.

Example

Current API clients

IndexSettings settings = new IndexSettings();
settings.DisablePrefixOnAttributes = new List
{
  "sku"
};

index.SetSettings(settings);
IndexSettings settings = new IndexSettings();
settings.DisablePrefixOnAttributes = new List
{
  "sku"
};

index.SetSettings(settings);
I