Limiting filesize on searching.

Gertjan Hofman <[email protected]>
Newsgroups gmane.comp.web.swish-e
Message-ID <[email protected]>
I am just posting this for dummies like me who aren't
familiar and/or dislike perl. When I asked Peter
Karman on how to do restrict the size of file being
anlyzed by swish-e  he responded:



Gertjan Hofman scribbled on 7/6/06 1:37 PM:
> is there no way
> to limiting the max size of the file which is
analyzed
> when not using -S prog ? It seems such a simple &
> useful feature, yet  I can't find it. 


Response:

I realize I didn't respond directly to this question.
No, swish-e  itself  has no such feature. You'd want
to implement in DirTree.pl with  something like:

  sub check_path {
     my $path = shift;
     return 0 if -s $path > 10000; # max bytes
     return 1;  # return true to process this file
  }

-- 



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.