- Type:
list<string>
- Default:
[]
(all string attributes) - Scope:
settings
- Deprecated name:
attributesToIndex
- Limits the attributes Algolia uses to find matches. Avoid searching attributes like URLs or image paths.
- Attributes listed first are more important for ranking. Records matching higher-priority attributes rank higher than those matching lower-priority attributes.
Updating the
searchableAttributes
parameter rebuilds your index.
If you need near real-time indexing, avoid changing the index configuration during high-traffic times.Usage
Default
If unset or set to an empty list, Algolia searches all string-based attributes. This turns off the Attributes ranking criterion.Priority order
Attributes are searched in the order they appear. Earlier attributes have higher ranking weight. By default, matches at the beginning of an attribute rank higher. To ignore the position of matches within an attribute, use modifiers.Attributes with the same priority
To make two attributes equally important, include them in the same comma-separated string. Attributes with the same priority as others are alwaysunordered
.
Nested attributes
You can specify nested attributes, such as,categories.lvl0.label
.
If you specify a parent attribute, all nested attributes are searchable.
Case-sensitive
Attribute names are case-sensitive.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.Modifiers
unordered
Ignores the position of a match within the attribute.
By default, matches at the beginning of an attribute rank higher.
Setting an attribute as unordered treats all matches within the attribute equally.
- Attributes with the same priority at the same level are always unordered
- The default differs between API (ordered) and Algolia dashboard (unordered).
Example
The following configuration:- Gives equal priority to
title
andalternative_title
- Ranks
author
next - Applies
unordered
totext
so that the match position doesn’t influence ranking - Searches only the
personal
field within the nestedemails
attribute
Current API clients
Current API clients
Legacy API clients
Legacy API clients