def search(self, query):
args, query = self._mk_query_args(query)<EOL>st = time.time()<EOL>res = self.redis.execute_command(self.SEARCH_CMD, *args)<EOL>return Result(res,<EOL>not query._no_content,<EOL>duration=(time.time() - st) * <NUM_LIT>,<EOL>has_payload=query._with_payloads)<EOL>
Search the index for a given query, and return a result of documents

### Parameters

- **query**: the search query. Either a text for simple queries with default parameters, or a Query object for complex queries.
             See RediSearch's documentation on query format
- **snippet_sizes**: A dictionary of {field: snippet_size} used to trim and format the result. e.g.e {'body': 500}