API Reference / API Parameters / disablePrefixOnAttributes
Type: list of strings
Engine default: []
Parameter syntax
'disablePrefixOnAttributes' => [

Can be used in these methods:

About this parameter

List of attributes for which you want to turn off prefix matching.

Use this parameter to ensure specific attributes, such as phone numbers and SKUs, only return exact matches.

Usage notes

  • searchableAttributes must not be empty or null for disablePrefixOnAttributes to be applied.
  • The list must be a subset of the searchableAttributes index setting.
  • Attribute names are case-sensitive.

There’s no limit to the number of attributes in the list, but having many attributes slows down calls to getSettings. This can make the Algolia dashboard slower and less responsive.


Disable prefix search for some attributes by default

  'disablePrefixOnAttributes' => [
Did you find this page helpful?