search()
search(string|array|\Elastica\Query $query = '', null $options = null, string $method = \Elastica\Request::POST) : \Elastica\ResultSet
Searches results for a query.
{ "from" : 0, "size" : 10, "sort" : { "postDate" : {"order" : "desc"}, "user" : { }, "_score" : { } }, "query" : { "term" : { "user" : "kimchy" } } }
Parameters
string|array|\Elastica\Query | $query | Array with all query data inside or a Elastica\Query object |
null | $options | |
string | $method | OPTIONAL Request method (use const's) (default = Request::POST) |
Returns
\Elastica\ResultSet —with all results inside