Path: usenet.cis.ufl.edu!usenet.eel.ufl.edu!psgrain!nntp.teleport.com!usenet From: mheins@prairienet.org (Mike Heins) Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc Subject: Search::Text available on CPAN Followup-To: comp.lang.perl.misc Date: 1 May 1996 21:33:09 GMT Organization: Prairienet Lines: 92 Approved: merlyn@stonehenge.com (comp.lang.perl.announce) Message-ID: <4m8lal$d9u@nadine.teleport.com> NNTP-Posting-Host: julie.teleport.com X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content. Xref: usenet.cis.ufl.edu comp.lang.perl.announce:330 comp.lang.perl.misc:28735 DESCRIPTION ----------- Search::Text is a module set designed to implement a common search interface to a number of different text-based search engines. Two example search modules are included with the distribution. Capabilities include: o Search only certain fields in a delimited text record o Match specific strings to specific fields o On-the-fly selection of search engine o Return any field with in the record, including fields delimited with a label o Skips header lines within files o Hooks for relevancy sorting o Hooks for implementing a complete search language o Case sensitivity o AND/OR implemented in examples, NEAR/NOT supported in base class o Cache search histories o Cache match returns for paging o Search multiple files o much more Two modules are provided initially, one for searching with Perl's built in regex matching, and one for Glimpse. The same search routines should work for both with only minor differences -- in fact, if your machine is fairly standard there should be no difference in operation. use Search::TextSearch; use Search::Glimpse; %options = ( case_sensitive => 1, search_file => 'index.txt', ); $t = new Search::TextSearch %options; $g = new Search::Glimpse %options; $t->search('FooBar'); $g->search('FooBar'); Both should operate the same provided the glimpse indices are set up to search the current directory. After installation, you should be able to access the documentation with the command: perldoc Search::Base INSTALLATION ------------ To install this module type perl Makefile.PL make make test make install EXAMPLES --------- A couple of meager examples are in the documentation, and there will be more as the next release occurs. AUTHOR ------ Mike Heins mikeh@iac.net Std dstribution site: CPAN/authors/id/MIKEH BUGS ----- Glimpse can't search based on fields when returning file names. The TextSearch should probably do a unary search on only one pattern, but then you could do it yourself. -- Regards, Mike Heins [mailed and posted] http://www.iac.net/~mikeh ___ ___ Internet Robotics |_ _|____ |_ _| Few blame themselves until they 131 Willow Lane, Floor 2 | || _ \ | | have exhausted all other Oxford, OH 45056 | || |_) || | possibilities. |___| _ <|___| -- anonymous mikeh@iac.net 513.523.5028 |_| \_\ .