feat(SearchDoc): Throw exception when onlyCount() query is invalid (refs #5162)
test(SearchDoc): Test for onlyCount() exceptions on invalid query (refs #5162)
Merge pull request #1366 from eguaj/3.2-A5162

feat(SearchDoc): Throw exception when onlyCount() query is invalid (closes #5162)