Perlfect Solutions
 

[Perlfect-search] Excluding file from indexing without specifying path

Yuriy Yakubovich yuriy@mint-tech.com
Mon, 26 Nov 2001 15:15:16 -0500
Not really.  I'm not sure I made it clear that files I'm trying to exclude
can be anywhere in the structure, not in /path/to/html_docroot/

I think the following piece of code will need to be modified in indexer.pl:

# Supported ways to list a file in conf/no_index:
# /home/www/test/index.html (absolute path)
# /test/index.html (path relative to webroot, but with slash)
# test/index.html (path relative to webroot, no slash)
# http://localhost/test/index.html (absolute URL)
sub to_be_ignored {
  my $file = shift;
  # Check @no_index:
  my $file_relative;
  $file_relative = cut_document_root($file);
  foreach my $regexp (@no_index) {
    if( $file_relative =~ m/^\/?$regexp$/ || $file =~ m/^$regexp$/ ) {
      return "listed in no_index.txt";
    }
  }

Thanks.

Yuriy

> -----Original Message-----
> From: perlfect-search-admin@perlfect.com
> [mailto:perlfect-search-admin@perlfect.com]On Behalf Of Daniel Naber
> Sent: Monday, November 26, 2001 1:03 PM
> To: perlfect-search@perlfect.com
> Subject: Re: [Perlfect-search] Excluding file from indexing without
> specifying path
>
>
> On Monday 26 November 2001 17:43, you wrote:
>
> > But I want to exclude any files matching that pattern
> >  regardless of where they are found.
>
> This should work:
> /path/to/html_docroot/*.vhd.html
>
> Regards
>  Daniel
>
> --
> http://www.danielnaber.de
> _______________________________________________
> perlfect-search mailing list
> perlfect-search@perlfect.com
> To unsubscribe, set other personal options or view the list
> archives please visit:
> 
> 
>