Tags:
create new tag
view all tags

SID-02371: Parameter "Date=" in %SEARCH-Function doesn't work

Status: Answered Answered TWiki version: 6.0.0 Perl version: v5.10.0
Category: CategorySearch Server OS: Suse Linux Enterprise Server 11 SP1 Last update: 6 years ago

I used following Statement in my "Sandbox Web" and it works fine.

%SEARCH{"\.*" scope="topic" type="regex" sort="modified" date="2014-01-01/2017-12-31" nosummary="on" nosearch="on"}%

I only get the topics in the list with the date between the given parameter.

If I try the exactly same statement in another web, sometimes I get topics with a shown date between 2013 and 2017, sometimes I get NO result. If I change the date-range to 2014-01-01/2018-12-31 i.e. in that web that showed no results, then the search shows all topcis from 2008 until 2018.

I tried other formats for the date, i.e "01 Jan 2014/31 Dec 2018" but the result is Error: Cannot handle date (0, 0, 0, 01, 0, 199500)

-- Peter Starek - 2018-08-27

Discussion and Answer

Is no one there in the whole wide world to help me ;-( ?

-- Peter Starek - 2019-05-14

The format 2014-01-01/2018-12-31 is the correct one.

The only explanation I could offer is that "something else" changed the file modification date. The inclusion (or exclusion) in the search results depends on the modification time of the file in the file system and not on the time of the most recent change as you see in the topic's history. I don't know of a ready-made program to "fix" this, though.

In any case, as ever so often, QuerySearch comes to the rescue. Try something like this, which actually parses the topic metadata (and hence will be slower than the "simple" one):

%SEARCH{"info[date >= d2n('2014-01-01')] AND info[date <= d2n('2017-12-31')] " type="query" sort="modified" nosummary="on" nosearch="on"}%

-- Harald Jörg - 2019-05-14

Your Statement for the QuerySearch works great - many, many thanks.

-- Peter Starek - 2019-05-16

      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 Parameter "Date=" in %SEARCH-Function doesn't work
SupportCategory CategorySearch
TWiki version 6.0.0
Server OS Suse Linux Enterprise Server 11 SP1
Web server Apache httpd 2.2.10
Perl version v5.10.0
Browser & version Firefox 52.7.2
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2019-05-16 - PeterStarek
 
  • 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.