Leo Charre > FileArchiveIndexer-1.29 > FileArchiveIndexer::Search

Download:
FileArchiveIndexer-1.29.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

FileArchiveIndexer::Search

DESCRIPTION ^

results_by_path()

returns hash ref, each key is an abs path to a file, each value is an array ref with results

results_files()

returns array ref to files foumd

result()

argument is abs path of the match returns array ref with matches inside that file

        my($page,$line,$content) = @{$s->result($abs_hit)};

raw_results()

results_count()

dbh()

returns database handle

execute()

perform the search

        $i->execute('looking for this text');

Optional argument is array ref of paths to prune in, only inside those paths.

SYNOPSIS ^

   my $fai = new FileArchiveIndexer({ abs_conf => '/etc/faindexer.conf' });
   
   
   my $results = $fai->search('my text');
        
        my $files = $results->results_files;

        for (@$files){
                my $matches = $results->result($_);

                print "file $_\n"

                for (@$matches){
                        my($page, $line, $content) = @$_;
                        print "page $page, line $line, content [$content]\n";
                }
        }

SEE ALSO ^

FileArchievIndexer

AUTHOR ^

Leo Charre leocharre at cpan dot org