Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 16

DoudouGumCloudSafemanZvonkoericgillettelucsandinosmwln +8 guests

sorting search results by date

Is there a way to sort search results by date?
or at least give the date more weight in the results relevance formula?

the search results seem to appear in random chronological order for hits that seem as though they should have equal relevance. i would think newer results should appear closer to the top if they're weighted the same, especially in a support forum as newer results are likely to have more up-to-date information. or are they? *shrug

on a side note, I can't believe i was posting here in 2005... :) hi nav! I mean Mark!

Comments

  • What order are they in by default? It would be nice to be able to sort them.
  • Posts: 1,290
    No idea. Doesn't seem to be an order. If there's a relevance sort happening, it's broken.
  • also interested in this...
  • Posts: 102
    Me too :)
  • Are there any updates on this? It's driving me absolutely nuts!
  • Editing line 102 in the class.searchmodel.php (applications\dashboard\model\class.searchmodel.php) seems to do the trick;

    ->OrderBy('s.Relavence', 'desc')

    Change this to;

    ->OrderBy('s.DateInserted', 'desc')

    But this doesn't "combine" relavance and date, it just sorts them by date. I don't know how it assigns a relavance to a post or how it decides this.
Sign In or Register to comment.