Skip to main content
  • Type: list<string>
  • Default: null(all numeric attributes)
  • Scope: settings
  • Deprecated name: numericAttributesToIndex
The numericAttributesForFiltering parameter defines which numeric attributes can be used for filtering. By default, all numeric attributes are available, but you can limit them for faster indexing and reduced index size.

Usage

  • Attribute names are case-sensitive.
  • If you pass an empty list or null, all numeric attributes are filterable.
  • To turn off numeric filtering entirely, pass an attribute that doesn’t exist (such as _no_numeric_attributes_).

Modifiers

equalOnly
Use this modifier when the attribute should only support equality filters (= or !=). This disables range-based filtering (<, <=, >, >=) for the attribute and improves performance.

Example

Current API clients

IndexSettings settings = new IndexSettings();
settings.NumericAttributesForFiltering = new List
{
  "attribute1",
  "popularity"
};

index.SetSettings(settings);
IndexSettings settings = new IndexSettings();
settings.NumericAttributesForFiltering = new List
{
  "attribute1",
  "popularity"
};

index.SetSettings(settings);
I