API Reference / API Parameters / synonyms
Type: boolean
Engine default: true
Parameter syntax
'synonyms' => true|false

Can be used in these methods:

About this parameter

Whether to take into account an index’s synonyms for a particular search.

This setting overrides the default query behavior, which is to use all defined synonyms on every search. By setting this to false, you are disabling synonyms for the given query. True is the engine default.

Examples

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