How can I sort the search results by date?

This question is in reference to Atlassian Documentation: Confluence Search Syntax

When I search my Confluence spaces, the results are not sorted by date. In fact, I can't seem to see any logic by which the results are sorted. This calls for a manual browse of the space, something my customers find unproductive. 

2 answers

1 accepted

3 votes
Stephen Deutsch Community Champion Feb 11, 2016

It used to not be possible, but thanks to the introduction of CQL, it certainly is.  However, Atlassian has not yet made it available in the user interface yet (for some reason). Here are some open feature requests:

https://jira.atlassian.com/browse/CONF-19493

https://jira.atlassian.com/browse/CONF-5785

Here's how you can do it manually by editing the URL:

https://<my_confluence_url>/dosearchsite.action?cql=siteSearch+~+"<search_terms_here>"+order+by+<lastmodified or created>

Just fill in the blanks for the spaces with <> and it will return the results ordered by creation date or last modified date.

For Confluence Cloud users, you could just install my plugin, CQL Search, which shows an interface directly to CQL in the interface:

https://marketplace.atlassian.com/plugins/cql-search/cloud/overview

If you want Atlassian to add this feature, vote on the feature requests and make sure you request that they add a filter for "order by" in the interface for the next version!

@Stephen Deutsch:

Any plans to provide your cql-query plugin for the self-hosted version of confluence?

If not - do you have any easy-to-provide idea how to realise sorted search results (e.g. via user macro / third party macro)?

Thanks in advance and best regards! 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

867 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you