7

When defining a search query, I would also like to define the sort order. I am, however, not yet sure what sort order would be most helpful for me, and thus I would like to know what options exist.

It seems that the query syntax does not provide such a possibility - at least there is nothing mentioned on the page on advanced searching. I did search through Stack Overflow META, but did not find any overview.

There is a possibility to add a sort option to the URL, as demonstrated in this question: How can I browse answers sorted by votes?. Another option that can be used appears to be tab=, as is discussed here. However, I did not find any documentation about what options could possibly be given to sort= or tab=. Thus the question:

What are the possibilities for sorting the results of queries?

I would be happy if the answer was only a link to a documentation page I have missed - in that case, however, it would be an improvement if this page was easier to find. If there is not a documentation page yet, it would be an improvement for the site if one was created.

1 Answer 1

3

If you are browsing a question list (homepage or tag), you have the following options:

  • Newest
  • Active
  • Bounties
  • Votes
  • Frequent

enter image description here

Your last used sort option here is saved.


Specifically for search only, the ?tab= parameter has these following options:

  • relevance (default)
  • newest
  • votes
  • active

enter image description here

Your last used search sort option is not saved, and will default to "relevance". You can pre-select a sort option before performing the search, as well as save your last search sort option using this userscript I made.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .