Short description

It would be nice if the search results could be sorted by date. This would also be useful where the FullSearch() macro is used to list subpages, such as in FeatureRequests on this wiki, so they are ordered by date rather than title.

Optionally allow sorting by the date of the current revision, or the first revision. Also possible reverse-sorting option.

Discussion

Preliminary thoughts about how to solve this

I think this is may just be a change to the SearchResults class (in search.py) to add an additional sorting method sortByEditDate() (which would complement the existing sortByPagename() and sortByWeight() methods).

Optionally be able to pass in whether the first or current revision should be used (I think the convention seems to be rev=0 for current revision, and 1 for first revision). The sort method may be able to use the lastEditInfo() method of the Page object, but I'm not sure of the costs involved with that.

Also the macros which invoke search, such as [[FullSearch]]], should be able to take arguments which say what to sort by, and also whether to do reverse sorting. Obviously they need to extract those arguments before the string gets passed to QueryParser. Also when sorting by date, the SearchResults.PageList method should also output the date.


CategoryFeatureRequest

MoinMoin: FeatureRequests/SearchResultsSortedByEditDate (last edited 2007-10-29 19:21:01 by localhost)