Skip to content

Conversation

@damiantw
Copy link
Contributor

@damiantw damiantw commented Nov 6, 2016

Adds an orders property to Builder. Generally you'll want to order by relevancy but not always. This allows drivers to be more flexible with ordered queries.

@taylorotwell
Copy link
Member

Why would you not want to sort by relevance?

@damiantw
Copy link
Contributor Author

damiantw commented Nov 7, 2016

A person made a request on my Laravel Scout MySQL driver package (buildwithyab/laravel-scout-mysql-driver#4)

Looks like they wanted users to be able to search for products and sort them by price, but dates seems to be the use case that comes to mind. For example If one wanted to do a full text search on posts then sort by created_at so newer posts show first.

@taylorotwell taylorotwell merged commit 1a320db into laravel:master Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants