I have some default sorted fields in a view and I would love to manipulate the order the fields are in similar to your search_api_sorts does it but with more control.
I have the option to ->getSort() from the SearchApiQuery interface and ->sort($sort, $order) but it's always appending and I have no access to the protected set of sorts in the object SearchApiQuery::$sort.
A couple solutions would be to provide a clearSort() method then I could get the pervious ones, clear them and add them back in the order I would like. Or better yet a setSorts($array) that could just full out replace them.
Thoughts?
Comments
Comment #1
Nick_vhgetSort gets it using a reference so you can just change it and it will change it upstream?
Comment #2
drunken monkey