feat(SearchDoc): Throw exception when onlyCount() query is invalid (refs #5236)
Merge pull request #270 from eguaj/3.2-A5236

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