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.

#292439 (closed)

In the advice of Elastic.co to simply these calls to help them run faster.

  • Move the Clause from MUST to FILTER this will save the "score" calculation.
  • Remove Boosting for iid and title. This will also prevent calculation scores.
  • Set the Size 0 , This will prevent fetching the documents.

Screen_Shot_2021-01-18_at_10.45.14_AM

Edited by John McGuire