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

DBSchema::Index(3pm)					User Contributed Perl Documentation				      DBSchema::Index(3pm)

NAME
DBIx::DBSchema::Index - Index objects SYNOPSYS
use DBIx::DBSchema::Index; $index = new DBIx::DBSchema::Index ( { } ); DESCRIPTION
DBIx::DBSchema::Index objects represent a unique or non-unique database index. METHODS
new HASHREF | OPTION, VALUE, ... Creates a new DBIx::DBschema::Index object. Accepts either a hashref or a list of options and values. Options are: name - Index name using - Optional index method unique - Boolean indicating whether or not this is a unique index. columns - List reference of column names (or expressions) name [ INDEX_NAME ] Returns or sets the index name. using [ INDEX_METHOD ] Returns or sets the optional index method. unique [ BOOL ] Returns or sets the unique flag. columns [ LISTREF ] Returns or sets the indexed columns (or expressions). columns_sql Returns a comma-joined list of columns, suitable for an SQL statement. sql_create_index TABLENAME Returns an SQL statment to create this index on the specified table. cmp OTHER_INDEX_OBJECT Compares this object to another supplied object. Returns true if they are identical, or false otherwise. cmp_noname OTHER_INDEX_OBJECT Compares this object to another supplied object. Returns true if they are identical, disregarding index name, or false otherwise. AUTHOR
Ivan Kohler <ivan-dbix-dbschema@420.am> Copyright (c) 2007 Ivan Kohler Copyright (c) 2007 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. BUGS
Is there any situation in which sql_create_index needs to return a list of multiple statements? SEE ALSO
DBIx::DBSchema::Table, DBIx::DBSchema, DBI perl v5.14.2 2007-06-28 DBSchema::Index(3pm)
Man Page