sumOrFiltersScores
false
'sumOrFiltersScores' => true|false
Can be used in these methods:
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
browseObjects,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
searchAsync,
browseAsync,
searchForFacetValues
Search,
Browse,
SearchForFacetValues,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
browse,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
BrowseObjects,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
browse index,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Determines how to calculate the total score for filtering.
When using filter scoring to rank filtered records, you can control how scores are calculated.
Usage notes:
-
This feature only applies to
OR
boolean operators in your filters (ie. notAND
). -
When
sumOrFiltersScores
isfalse
, max score will be kept. -
When
sumOrFiltersScores
istrue
, score will be summed. -
Just to be clear: False means that the total score of a record is the maximum score of an individual filter. Setting it to true changes the total score by adding together the scores of each matched filter.
Examples
Apply optional filters on a search query
1
2
3
$results = $index->search('query', [
'sumOrFiltersScores' => true
]);