Closed montepente closed 10 years ago
this was addressed in 2.2 (it checks to see if sort is set before adding a default), i think a problem with this change is it will actually stack the sorts vs. overwrite (i haven't tested this out but it seems implied by the fact it is called "addSort").
If it's under, it will stack with the ones we set before, yes but for example, if we have a sort ("_score" => "asc"), it will add ("_score") right after. So the way it is right now, it is never possible to set an ascending score
Move addSort so it is possible to override sort value in elasticsearch_searcher_query filter
Right now, it is impossible to sort by "_score" ascending instead of descending because the value is overriden after the searcher_query filter. By moving the addSort just before the filter, it is possible to do so.