Skip to main content.
home | support | download

Back to List Archive

Re: Sorting by swishlastmodified...

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Fri Apr 06 2001 - 09:36:14 GMT
On Thu, 5 Apr 2001, David Wood wrote:

> Hi folks,
> 
> Using '... -s swishlastmodified desc' _almost_ works perfectly.  The only 
> problem I've uncovered is that, if you've created your index via spidering, 
> there's no swishlastmodified stored, I guess because the files aren't local 
> and stat'able, and so all dates for spidered content come back as 31 Dec. 
> 1969!  But don't nicely behaved web servers pass a Last Modified HTTP 
> header to clients?  If so, might we be able to use that to set 
> swishlastmodified when creating a spider-generated index?

You might have missed my last post.  If you use the "prog" method with the
provided spider.pl you will get the last modified date, plus it will
probably spider faster.


> 
> One other small enhancement request in this area would be for -x 
> <swishlastmodified fmt="..."> to support a fmt of just giving straight 
> seconds since the epoch back.  Strangely enough strftime doesn't seem to 
> offer that.

It is documented, but not very clearly.
http://sunsite.berkeley.edu:4444/SWISH-RUN.html

Standard predefined formats: 

If you ommit the sub-format, the following formats are used: 

    String type:       "%s"  (like printf char *)
    Integer type:      "%d"  (like printf int)
    Date type:         "%Y-%m-%d %H:%M:%S" (like strftime)
    Float type:        "%f"  (like printf double) 
 

-x '<swishlastmodified fmt="%d">\n'
Received on Fri Apr 6 09:40:41 2001