Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tm::index::match(3pm) [debian man page]

TM::Index::Match(3pm)					User Contributed Perl Documentation				     TM::Index::Match(3pm)

NAME
TM::Index::Match - Topic Maps, Indexing support (match layer) SYNOPSIS
# somehow get a map (any subclass of TM will do) my $tm = ... # one option: create a lazy index which learns as you go use TM::Index::Match; my $idx = new TM::Index::Match ($tm); # for most operations which involve match_forall to be called # reading and querying the map should be much faster # learn about some statistics, what keys are most likely to be useful my @optimized_keys = @{ $stats->{proposed_keys} }; # another option: create an eager index my $idx = new TM::Index::Match ($tm, closed => 1); # pre-populate it, use the proposed keys $idx->populate (@optimized_keys); # this may be a lengthy operation if the map is big # but then the index is 'complete' # query map now, should also be faster # getting rid of an index explicitly $idx->detach; # cleaning an index $idx->discard; DESCRIPTION
This index implements a generic query cache which can capture all queries not handled by more specific indices. This class inherits directly from TM::Index. INTERFACE
Constructor The constructor/destructors are the same as that described in TM::Index. Methods populate $idx->populate (@list_of_keys) To populate the index with canned results this method can be invoked. At this stage it is not very clever and may take quite some time to work its way through a larger map. This is most likely something to be done in the background. The list of keys to be passed in is a bit black magic. Your current best bet is to look at the index statistics method, and retrieve a proposed list from there: @optimized_keys = @{ $stats->{proposed_keys} }; $idx->populate (@optimized_keys[0..2]); # only take the first few If this list is empty, nothing clever will happen. statistics $hashref = $idx->statistics This returns a hash containing statistical information about certain keys, how much data is behind them, how often they are used when adding information to the index, how often data is read out successfully. The "cost" component can give you an estimated about the cost/benefit. SEE ALSO
TM, TM::Index COPYRIGHT AND LICENSE
Copyright 200[6] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-04-10 TM::Index::Match(3pm)

Check Out this Related Man Page

Pod::Index::Builder(3pm)				User Contributed Perl Documentation				  Pod::Index::Builder(3pm)

NAME
Pod::Index::Builder - Build a pod index SYNOPSIS
use Pod::Index::Builder; my $p = Pod::Index::Builder->new( pi_base => $base_path, ); for my $file (@ARGV) { $p->parse_from_file($file); } $p->print_index; DESCRIPTION
This is a subclass of Pod::Parser that reads POD and outputs nothing. However, it saves the position of every X<> entry it sees. The index can be retrieved as a hashref, or printed in a format that is understandable by Pod::Index::Search. METHODS
new The constructor, inherited from Pod::Parser. The only optional argument that cares about is "pi_base". If given, it is used as a base when converting pathnames to package names. For example, if "pi_path" = "lib", the filename lib/Pod/Index.pm will turn into "Pod::Index", instead of the undesirable "lib::Pod::Index". pod_index Retrieves the index as a hashref. The hash keys are the keywords contained in the X<> tags, normalized to lowercase; the values are array references of Pod::Index::Entry objects. print_index $parser->print_index($fh); $parser->print_index($filename); $parser->print_index(); Prints the index to the given output filename or filehandle (or STDOUT by default). The format is tab-delimited, with the following columns: 1) keyword 2) podname 3) line number 4) context (title of section containing this entry) The index is sorted by keyword in a case-insensitive way. VERSION
0.14 SEE ALSO
Pod::Index, Pod::Index::Entry, Pod::Index::Search, Pod::Parser, perlpod AUTHOR
Ivan Tubert-Brohman <itub@cpan.org> COPYRIGHT
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2005-10-16 Pod::Index::Builder(3pm)
Man Page