Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Claushingebjerg 886 posts 2415 karma points
    Nov 30, 2010 @ 13:04
    Claushingebjerg
    0

    Sorting search results

    Is there a simple way to let the user sort the search result by Published date instead of relevance?

  • Kim Andersen 1447 posts 2196 karma points MVP
    Nov 30, 2010 @ 13:33
    Kim Andersen
    0

    Hi Claus

    I'm think you can change the sorting in the XSLTsearch.xslt. Find this line (around line 321):

    <xsl:sort select="substring-before(substring-after($pageScoreList, concat(';',generate-id(.),'=')),';')" data-type="number" order="descending"/>

    I'm pretty sure you can just change this line to something like this:

    <xsl:sort data-type="text" select="@updateDate" order="descending" />

    I haven't tried it, but I think it will work :)

    /Kim A

  • Douglas Robar 3570 posts 4671 karma points MVP ∞ admin c-trib
    Nov 30, 2010 @ 13:48
    Douglas Robar
    0

    Kim's advice is exactly what I would try. Basically, you want to ignore all the page ranking and sort on the appropriate field instead (@createDate or @updateDate probably).

    Let us know how you get on with it.

    cheers,
    doug.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies