feat(SearchDoc): Throw exception when onlyCount() query is invalid (refs #5162)
test(SearchDoc): Test for onlyCount() exceptions on invalid query (refs #5162)