mode
mode = neuralSearch | keywordSearch
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
SetSettings
setSettings
SetSettings
setSettings
About this parameter
Activate or deactivate NeuralSearch for a participating index.
After activating NeuralSearch, you can set the search mode for the index.
If mode is neuralSearch, NeuralSearch is active for the current index.
If you set getRankingInfo to true,
the _rankingInfo property in the API response contains these additional fields:
keywordScore: How well the record matched in keyword searchsemanticScore: How well the record matched in semantic searchneuralScore: A combination of both scores
If mode is keywordSearch, results are returned from keyword search only.
Options
|
Use only keyword-based search. |
|
Use NeuralSearch, which combines keyword and AI-based vector search. |
Examples
Turn on NeuralSearch
Set the mode to neuralSearch to turn on NeuralSearch for an index.
1
$index->setSettings(['mode' => 'neuralSearch']);
Turn off NeuralSearch
Set the mode to keywordSearch to turn off NeuralSearch for an index.
1
$index->setSettings(['mode' => 'keywordSearch']);