نديم ابن ﺤﻣﻮﺪﺓ الخمير - Nadim Khemir > Search-Indexer-Incremental-MD5 > Search::Indexer::Incremental::MD5::Searcher

Download:
Search-Indexer-Incremental-MD5-0.06.22.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Search::Indexer::Incremental::MD5::Searcher - Search your indexed files

SYNOPSIS ^

  my $search_string = 'find_me' ;
  my $searcher = 
        eval 
        {
        Search::Indexer::Incremental::MD5::Searcher->new
                (
                USE_POSITIONS => 1, 
                INDEX_DIRECTORY => 'text_index', 
                get_perl_word_regex_and_stop_words(),
                )
        } or croak "No full text index found! $@\n" ;
  
  my $results = $searcher->search($search_string) ;
  
  # sort in decreasing score order
  my @indexes = map { $_->[0] }
                    reverse
                        sort { $a->[1] <=> $b->[1] }
                            map { [$_, $results->[$_]{SCORE}] }
                                0 .. $#$results ;
  
  for (@indexes)
        {
        print {* STDOUT} "$results->[$_]{PATH} [$results->[$_]{SCORE}].\n" ;
        }
        
  $searcher = undef ;

DESCRIPTION ^

This module implements an incremental text indexer and searcher based on Search::Indexer.

DOCUMENTATION ^

Given a list of files, this module will allow you to create an indexed text database that you can later query for matches. You can also use the siim command line application installed with this module.

SUBROUTINES/METHODS ^

new( %named_arguments)

Create a Search::Indexer::Incremental::MD5::Searcher object.

  my $indexer = new Search::Indexer::Incremental::MD5::Searcher(%named_arguments) ;

Arguments - %named_arguments

-

Returns - A Search::Indexer::Incremental::MD5::Searcher object

Exceptions -

words( $prefix)

Returns an array reference containing words starting with $prefix

Arguments

Returns - An array reference containing the words starting with $prefix

Exceptions - No full text index found

search(%named_arguments)

search for $search_string in the index database

Arguments %named_arguments

SEARCH_STRING - Query string see Search::Indexer

Returns - Array reference - each entry contains

match_description(%named_arguments)

search for documents which description matches a regular expression passed as argument. Documents without description never match.

Arguments %named_arguments

SEARCH_STRING - regular expression to match with the description field

Returns - Array reference - each entry contains

BUGS AND LIMITATIONS ^

None so far.

AUTHOR ^

        Nadim ibn hamouda el Khemir
        CPAN ID: NKH
        mailto: nadim@cpan.org

LICENSE AND COPYRIGHT ^

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Search::Indexer::Incremental::MD5

You can also look for information at:

SEE ALSO ^

syntax highlighting: