Update Query counts in Advanced Search to be more efficient
Currently, when doing Elasticsearch calls to retrieve counts for advanced search scopes, several pieces are used that are not needed.
In the advice of Elastic.co to simply these calls to help them run faster.
-
Move the Clause from MUST
toFILTER
this will save the "score" calculation. -
Remove Boosting for iid
andtitle
. This will also prevent calculation scores. -
Set the Size
0 , This will prevent fetching the documents.
Edited by John McGuire