decompoundQuery
true
'decompoundQuery' => true
Can be used in these methods:
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
set_settings,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
setSettings,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
searchAsync,
setSettingsAsync,
browseAsync,
searchForFacetValues
Search,
SetSettings,
Browse,
SearchForFacetValues,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
setSettings,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
SetSettings,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
setSettings,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Splits compound words into their composing atoms in the query.
Compound words segmentation splits compound words into atoms to ensure a higher chance of finding relevant matches.
When true
, it ensures that compound words are split in search queries. When false
, all compound words remain whole.
This applies for queries where queryLanguages
is set to de
, nl
, fi
, da
, sv
or no
.
Usage notes:
- This parameter works alongside the
queryLanguages
setting and is complementary withdecompoundedAttributes
. - Most of the time, you should use this feature as it leads to better matching and relevance in the compatible languages.
- List of supported languages : German, Dutch, Finnish, Danish, Swedish, and Norwegian.
Examples
Enable splitting compound words by default
1
2
3
$index->setSettings(array(
'decompoundQuery' => true,
));
Enable splitting compound words for the current search
1
2
3
$res = $index->search('query string', [
'decompoundQuery' => true
]);