sorting search results by date
  • ithcyithcy
    Posts: 1,290
    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!
  • What order are they in by default? It would be nice to be able to sort them.
  • ithcyithcy
    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...
  • tmilovantmilovan
    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.

Howdy, Stranger!

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

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

In this Discussion

Who's Online 1

paintballer82