Item1669: SEARCH with order="modified" uses file dates

pencil
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: SEARCH
Branches:
Reported By: RaymondLutz
Waiting For:
Last Change By: CrawfordCurrie
SEARCH with order="modified" does not use topic metadata but rather uses file system information. Results incorrect if file system dates are modified.

After recently installing an updated version, I blew it and now the topic files have the more recent dates on them, overwriting the previous files. This occurred because I made an test version of the system off to the side, and the copy adopted the current date rather than the established date.

The code in Search.pm uses the file system date to save time, and assumes that the metadata date will be about the same.

I wrote a small utility that modifies the modification dates in the file system based on the metadata in the file. It might be a good idea to make this utility part of the release or add it to the tick cron file so the dates will be corrected if they get off. (See attachment).

-- RaymondLutz - 28 May 2009


thinking about this a little, the right thing to do, would be for the file date to be used as an optimization - ie, the code should confirm that the optimisation is valid, and if not, fall back to the slower path. (ie, to use the in topic dates, and even possibly do the fixup that Raymond provided code for)

-- SvenDowideit - 01 Sep 2009

it uses whatever the store says is the date, which for all the stores I'm aware of is (now) correct.

-- CrawfordCurrie - 21 Dec 2014

ItemTemplate edit

Summary SEARCH with order="modified" uses file dates
ReportedBy RaymondLutz
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component SEARCH
Priority Low
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
I Attachment Action Size Date Who Comment
fixup_foswiki_modtimes.pl.txttxt fixup_foswiki_modtimes.pl.txt manage 3 K 29 May 2009 - 00:02 RaymondLutz Utility to fix up the modification times in the foswiki data directory. cd to data and run from there.
Topic revision: r4 - 21 Dec 2014, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy