Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

sorting search results by date

ithcyithcy New
edited September 2010 in Vanilla 2.0 - 2.8
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.
  • No idea. Doesn't seem to be an order. If there's a relevance sort happening, it's broken.
  • also interested in this...
  • Me too :)
  • Are there any updates on this? It's driving me absolutely nuts!
  • edited December 2010
    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.