Tags:
create new tag
, view all tags

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

 
Topic revision: r2 - 2006-06-08 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.