private function isSearchQuery(array $criteria)
    {
        if (isset($criteria['$text'])) {
            return true;
        }
        foreach ($criteria as $key => $value) {
            if (is_array($value) && true === $this->isSearchQuery($value)) {
                return true;
            }
        }
        return false;
    }