API Reference / API Parameters / enableRules
Jan. 07, 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?