Executes the query and returns the complete search result including e.g. hits, facets, totalCount.
public search ( |
||
$db | the database connection used to execute the query. If this parameter is not given, the `elasticsearch` application component will be used. | |
$options | array | The options given with this query. Possible options are: - [routing](http://www.elastic.co/guide/en/elasticsearch/reference/current/search.html#search-routing) - [search_type](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-type.html) |
return | array | the query results. |