Feature Proposal: Add a "random" option for order attribute in VarSEARCH
Motivation
Sometimes it's desirable have search results listed in a random order - e.g. differently each time the topic is rendered. Another scenario is wanting a search to return 1 topic, but a different one each time (as in
TWikiTipsOfTheDayInclude).
Description and Documentation
Create a new
order="random" setting for
VarSEARCH.
See
HowToShowSearchResultsInRandomOrder for references to a couple of bits of perl code that should do what's needed. All that's needed is adding it to
search.pm .
This is the bit tricky part: if we also set
limit="1" , could we get it to return a different result each time?
Examples
Impact and Available Solutions
Implementation
--
Contributors: LynnwoodBrown
Discussion
--
LynnwoodBrown - 08 Jun 2006
I see now that there are more use cases than I anticipated. I support this feature request.
The limit is applied after the sort (at least for date sort), so this should be fine.
--
PeterThoeny - 08 Jun 2006