[#334] Use `options.delete(:sort)` in model search to halt bubbling of `sort` into URL parameters
[#334] Use `options.delete(:sort)` in model search to halt bubbling of `sort` into URL parameters

When the query is provided as hash, the params get concatenated, producing a query like this:

    curl -X GET "http://localhost:9200/graylog2/message/_search?from=0&page=1&per_page=100&size=100&sort=created_at+desc&pretty=true" -d '{"query":{"query_string":{"query":"*"}},"sort":[{"created_at":"desc"}],"size":100,"from":0}'

It produces an error:

    Parse Failure [No mapping found for [created_at desc] in order to sort on]

I don't know whether the other parameters should be there, as they're duplicated in the query, but at least they don't make the request invalid.

brijeshgpt7/retire,zaharpecherin/retire,ChapterMedia/tire,HenleyChiu/tire,dbose/retire,tklee/tire_shiphawk,doximity/tire,mavenlink/retire,iamrahulroy/retire,1776/tire,elbuo8/retire,karmi/retire,fabn/retire,alphagov/tire,Telmate/tire,rubydubee/retire