attributeForDistinct
null
'attributeForDistinct' => 'attribute'
Can be used in these methods:
setSettings
set_settings
setSettings
set_settings
setSettings
setSettings
setSettingsAsync
SetSettings
setSettings
SetSettings
setSettings
About this parameter
Name of the de-duplication attribute to be used with the distinct
feature.
Usage notes:
-
You can define only one attribute for distinct.
-
It must be done at indexing time; it cannot be defined or overridden at query time.
Examples
Set the attribute to distinct on
1
2
3
$index->setSettings([
'attributeForDistinct' => 'url'
]);