🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
API Reference / API Parameters / enableRules
Type: boolean
Engine default: true
Parameter syntax
'enableRules' => true|false

Can be used in these methods:
search, setSettings, browseObjects, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey

About this parameter# A

Whether Rules should be globally enabled.

This is a global switch that affects all rules.

Usage notes#

  • When true, Rules processing is enabled: Rules may match the query.
  • When false, Rules processing is disabled: no Rule will match the query.

Examples# A

Enable Rules by default#

1
2
3
$index->setSettings([
  'enableRules' => true
]);

Enable Rules for the current search#

1
2
3
$results = $index->search('query', [
  'enableRules' => true
]);
Did you find this page helpful?
PHP v3