Yes, Algolia lets you restrict which attributes are searched on a per-query basis by using the restrictSearchableAttributes API parameter.
How it works
-
This parameter takes a list of attribute names and limits the full-text search to only those attributes for that specific query.
Example (JavaScript):index.search('query', { restrictSearchableAttributes: ['title', 'author'] }); It only functions when your index already has
searchableAttributesconfigured — otherwise it has no effect.It does not change your index settings permanently — it only applies to that query.
Limitations
-
You cannot use
restrictSearchableAttributesto:Target sub-fields within comma-separated values inside a single searchable attribute.
Modify ranking priority beyond the subset filtering.
Combine multiple attribute sets mapped to different queries in a single call.