Max Muzi > MMM-Text-Search-0.07 > MMM::Text::Search

Download:
MMM-Text-Search-0.07.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.07   Source  

NAME ^

MMM::Text::Search - Perl module for indexing and searching text files and web objects

SYNOPSIS ^

  use MMM::Text::Search;
          
  my $srch = new MMM::Text::Search {    #for indexing...
        #index main file location...  
                IndexPath => "/tmp/myindex.db",
        #local files... (optional)
                FileMask  => '(?i)(\.txt|\.htm.?)$',
                Dirs      => [ "/usr/doc", "/tmp" ] ,
                FollowSymLinks => 0|1, (default = 0)
        #web objects... (optional)
                URLs      => [ "http://localhost/", ... ],
                Level     => recursion-level (0=unlimited)              
        #common options...              
                IgnoreLimit =>  0.3,   (default = 2/3)
                Verbose => 0|1                          
        };
  
  $srch->start_indexing_session();
        
  $srch->commit_indexing_session();
  
  $srch->index_default_locations();
        
  $srch->index_content( { title =>   '...', 
                          content=>  '...', 
                          id =>      '...'  } );
         
  $srch->makeindex;
       (Obsolete.) 


        
        

  my $srch = new MMM::Text::Search (  #for searching....
                  "/tmp/myindex.db", verbose_flag );
  
  my $hashref = $srch->query("pizza","ciao", "-pasta" );  
  my $hashref = $srch->advanced_query("(pizza OR ciao) AND NOT pasta");  

  $srch->errstr()       # returns last error 
                        # (only query syntax-errors for the moment being)

  
  $srch->dump_word_stats(\*FH)  

DESCRIPTION ^

NOTES ^

Note on implementation: The technique used for indexing is substantially derived from that exposed by Tim Kientzle on Dr. Dobbs magazine.

BUGS ^

Many, I guess.

AUTHOR ^

Max Muzi <maxim@comm2000.it>

SEE ALSO ^

perl(1).

syntax highlighting: