Tags:
create new tag
view all tags

SID-01382: How to find topics modified in a date range?

Status: Answered Answered TWiki version: 4.1.2 Perl version: 5.8.7
Category: CategorySearch Server OS: Ubuntu Last update: 14 years ago

I want to do a search where I locate topics that have been modified in a specific date range -- say in the month of January 2012.

I originally setup a search using that used a conditional in the format with the $date (time of latest revision) to produce a list of pages. However, this will only produce results where the latest modification is in that month. If the topic is modified in the period but then modified again, for example in Febrary, 2012, it will drop out of the search result for the month of January because its latest modify value is now in February. Is there a way to do a search that looks not only at the latest modify time but also older revision modify times to determine if a page was modified during a time span?

-- RickMach - 2012-01-19

Discussion and Answer

Two options:

1. Use date range search with QuerySearch. Untested SEARCH term: (info.date > d2n('2012-01-01')) AND (info.date < d2n('2012-01-31'))

2. Use conditional output in format="" parameter of SEARCH based on date. This can be done with a delayed CALC using: $percntCALC{$IF(..., | $topic | ... |, <nop>)}$percnt - one trick: You can use <nop> for outside the range, which means no output at all. This will concatenate table rows, say you have condition met (produces a table row), not met (produces nothing), met again (produces a table row).

Please post your result here for others to learn.

-- PeterThoeny - 2012-01-19

Thanks for the feedback. However, looking at the documentation I don't see how either of these will work for my situation. Am I missing something? Both of these pull the date/time of the latest revision. info.date pulls the date from the META:TOPICINFO which is about the latest revision. Likewise the documentation for the date SEARCH says "limits the results to those pages with latest edit time in the given TimeInterval." The latest edit time will not find all the pages.

I'm looking for a way to find out if a page was modified in a range which may or may not be the latest edit time. As noted in my original question, I want it to find pages that were modified in the date range even if they were modified again after the end of the date range.

-- RickMach - 2012-01-19

Oh, I did not realize that you want to look at the topic history. There is currently no way to query the update history of a page. This would be a useful enhancement. TWiki is an open source project where people are expected to take and contribute back. You can get involved with the community or hire a TWiki consultant to do that enhancement for you.

-- PeterThoeny - 2012-01-20

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title How to find topics modified in a date range?
SupportCategory CategorySearch
TWiki version 4.1.2
Server OS Ubuntu
Web server Apache 1.3
Perl version 5.8.7
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2012-01-20 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.