Well, my search script currently parses the main directory and all its sub-directories for html files and then uses regular _expression_ to match the words user has entered for the search

 

                        open(IFP, $File::Find::name) or print "Search error $! :$fname <br>";  # only if html file

                        my $string = <IFP>;

                        close(OFP);

 

                        return unless ($string =~ /\Q$keywords\E/i);

                        if ($string =~ /<title>(.*?)<\/title>/is)

                        {

                             $page_title = $1;

                        }

 

I have a feeling that this is not the most efficient way of searching for all files that contain the words the user entered in his search criteria. And it is also very slow.

 

So I am looking for some code examples or modules I can use for the search engine so that it will be a faster.

 

 

Thanks

--Sheetal

    x.51226

 

-----Original Message-----
From: Thutika, Srinivas (ODC - Satyam) [mailto:[EMAIL PROTECTED]
Sent:
Wednesday, March 24, 2004 10:25 AM
To: Desai, Sheetal A
Subject: RE: Search Engine for intranet web site

 

could u pls explain in little detail

-----Original Message-----
From: Desai, Sheetal A [mailto:[EMAIL PROTECTED]
Sent:
Wednesday, March 24, 2004 8:42 PM
To: perl-win32-users
Subject: Search Engine for intranet web site

Hello there,

 

I am trying to setup a search engine for the web-site I have created. I have setup a search engine script using the File::Find module but it is really slow. Anyone know of any faster way of doing so - maybe a grep of all the files within a directory and its sub-directories for the title only to make it faster.

 

I would like to give the user an option of searching just the title or brief description or entire contents of the file.

 

Thank you,

Sheetal

 

==============================================================================

If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.

Click here for important additional terms relating to this e-mail.
<http://www.ml.com/email_terms/>

==============================================================================

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to