When searching by tags via URL, order results from newest to oldest

Hi,

When I go to community.company.com/.../tag2...

...I would expect the results to be ordered from newest to oldest. Currently they are ordered from oldest to newest. In our community, videos that are 4+ years old are at the top of the results and videos made this week are on subsequent pages.

Borrowing from the API I tried appending sort=date+desc to the end of the URL, but it has no effect. Maybe that is expected.

The goal is to enable users to see a list of only videos that have a certain tag. The word cloud is not an option because non-standard variations of the tag appear and while this is OK for some users, this confuses a certain subset of users.

Are there any solutions for resolving this, or workarounds?

Thank you

 


  • So, it looks like the URL is pointing to a tag page or media list.. I have no idea.. but if it is a list and you are the group owner, you can edit the page, and change the widget's default sort order. 

    Sorting works, must work, or something is wrong... What REST endpoint are you working with?
    I think if it's the Sort key word is 'date desc', no + sign.. these  options are usual options I have tested with positive results: 

    ["asc", "desc", "date", "titlesort", "date desc", "titlesort asc"]

    However, if you are using the aggregatetags, then it's SortBy and then SortOrder.. below are example URLs with a few results:

    The REST api looks the same at v 12, but the request I used in the REST API widget on 9.x was this:
    /api.ashx/v2/aggregatetags.json?formatresponse=true&r=87221245&PageSize=3&PageIndex=0&SortBy=LatestTaggedDate&SortOrder=Ascending&_=1612644853506



    {
      "PageSize": 3,
      "PageIndex": 0,
      "TotalCount": 17913,
      "AggregateTags": [
        {
          "ContentCount": 1,
          "Name": "D610 WAP Wireless",
          "LatestTaggedDate": "2009-08-26T21:01:24.22+00:00"
        },
        {
          "ContentCount": 1,
          "Name": "CG10 JMSEL",
          "LatestTaggedDate": "2009-08-31T21:30:58.53+00:00"
        },
        {
          "ContentCount": 6,
          "Name": "TE17",
          "LatestTaggedDate": "2009-09-01T23:25:23.413+00:00"
        }
      ],
      "Info": [],
      "Warnings": [],
      "Errors": []
    }


    /api.ashx/v2/aggregatetags.json?formatresponse=true&r=99391512&PageSize=3&PageIndex=0&SortBy=LatestTaggedDate&SortOrder=Descending&_=1612644853510

    {
      "PageSize": 3,
      "PageIndex": 0,
      "TotalCount": 17913,
      "AggregateTags": [
        {
          "ContentCount": 31,
          "Name": "GeoJSON",
          "LatestTaggedDate": "2021-01-29T19:12:15.467+00:00"
        },
        {
          "ContentCount": 33,
          "Name": "kml",
          "LatestTaggedDate": "2021-01-29T19:07:59.02+00:00"
        },
        {
          "ContentCount": 4,
          "Name": "Community Map",
          "LatestTaggedDate": "2021-01-29T19:06:10.883+00:00"
        }
      ],
      "Info": [],
      "Warnings": [],
      "Errors": []
    }

    When I read your post first, I was thinking it was a customization request.. but the more I thought about it, the problem is really more of a Solr (or whatever your search engine) search problem that can normalize tags into sort of 'mind map' of ideas. So many similar spellings or similar words are retagged. It is actually a good data science idea for a data service but still need a gallery of simple widgets to display the tags.  The tag cloud I would like to see is more of a spring graph.. or something like this or https://observablehq.com/@d3/temporal-force-directed-graph,  combining it with this.. https://observablehq.com/@d3/word-cloud.
    or arrange tags on a timeline.. like  MIT's simile timeline:
     

  • Thank you so much for this answer. It solved the issue. I agree that it would be helpful to find a way to address similar spellings/words!