API Reference / API Parameters / enableRules
Feb. 26, 2019
Type: boolean
Engine default: true
Parameter syntax
'enableRules' => true|false

Can be used in these methods:

About this parameter

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

Enable Rules by default

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

Did you find this page helpful?