You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can not apply a sort using the Elasticsearch\Client::search method as outlined below. The bug appears to be in AbstractEndpoint::convertArraysToStrings and it incorrectly attempts to implode() any nested array into a comma separated list but the 'sort' search criteria can be a simple string or another nested array of parameters.
$es = new Elasticsearch\Client();
print_r($es->search(array(
'index' => 'my_index',
'type' => 'my_type',
'sort' => array(
// 'aFieldName', // this would work ... the next line doesn't
'dateCreated' => array( 'order' => 'desc' ),
),
'body' => array(
'query' => array(
'query_string' => array(
'query' => 'search term'
)
)
)
)));
The text was updated successfully, but these errors were encountered:
Thanks for the report! Looks like this would have affected other "complex" parameters like filter or facet. Bug fixed and a few tests added. Let me know if you run into any more problems!
I can not apply a sort using the Elasticsearch\Client::search method as outlined below. The bug appears to be in AbstractEndpoint::convertArraysToStrings and it incorrectly attempts to implode() any nested array into a comma separated list but the 'sort' search criteria can be a simple string or another nested array of parameters.
The text was updated successfully, but these errors were encountered: