SID-00521: Top 5 changes across all Webs
| Status: |
Answered |
TWiki version: |
4.3.0 |
Perl version: |
|
| Category: |
CategorySearch |
Server OS: |
|
Last update: |
16 years ago |
Hello!
I've played around with the SEARCH function for a while now.
Now I wonder how to search for the top 5 changes across all Webs resulting in a 5 row table.
I know that I can use web="all" and limit="5" but when i do this the result contains 5 rows for
each web.
So how can i restrict the result set to only 5 records say e.g
| topic |
web |
| Topic1 |
Main |
| Topic2 |
Support |
| Topic3 |
TWiki |
| Topic4 |
Main |
| Topic5 |
Main |
Is there maybe a way to limit the overall result set instead of limiting the result set for a single web?
Thank you for your help!
--
AndreasHeyden - 2009-09-09
Discussion and Answer
The example at
WebChangesForAllWebs probably comes close to what you need.
--
PeterThoeny - 2009-09-09
Thank you Peter for this hint.
But this is what I actually do not want.
You can choose whether to show 20, 100, 200 ... results
for each web resulting in a total result set of 60, 200, 400 ... hits.
What I want is a sorted list of the latest 5 modifications in the whole wiki - no matter in which web the modification was.
So why is the "limit" parameter restricted to the hits for one web and not for the overall hits?
--
AndreasHeyden - 2009-09-10
This is not directly supported. TWiki is open source software. I invite you to get involved with the TWiki community. If you participate you can influence the feature enhancements that get accepted. More on that at
ReadmeFirst.
As a workaround, you can use
SpreadSheetPlugin list functions to manipulate the list of recently changed topics of the webs you are interested in.
Here is an example for the topic changes of Codev, Plugins, Support webs on twiki.org. Write this:
%CALC{$SET(list, )}%
%SEARCH{
".*"
scope="topic"
type="regex"
web="Codev, Plugins, Support"
nonoise="on"
limit="10"
order="modified"
reverse="on"
format="$percntCALC{$SET(list, $GET(list), $date: [[$web.$topic][$topic]] in <nop>$web web)}$percnt"
}%
%CALC{$LISTJOIN($n, $LISTMAP(| $item |, $LISTTRUNCATE(10, $LISTREVERSE($LISTSORT($GET(list))))))}%
To get this:
--
PeterThoeny - 2009-09-10
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.