Search::InvertedIndex

Search::InvertedIndex is a manager for inverted index maps.
Download

Search::InvertedIndex Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Benjamin Franz
  • Publisher web site:
  • http://www.nihongo.org/snowhare/utilities/ftpweblog/

Search::InvertedIndex Tags


Search::InvertedIndex Description

Search::InvertedIndex is a manager for inverted index maps. Search::InvertedIndex is a manager for inverted index maps.SYNOPSIS use Search::InvertedIndex; my $database = Search::InvertedIndex::DB::DB_File_SplitHash->new({ -map_name => '/www/search-engine/databases/test-maps/test', -multi => 4, -file_mode => 0644, -lock_mode => 'EX', -lock_timeout => 30, -blocking_locks => 0, -cachesize => 1000000, -write_through => 0, -read_write_mode => 'RDWR'; }); my $inv_map = Search::Inverted->new({ -database => $database }); ########################################################## # Example Update ########################################################## my $index_data = "Some scalar - complex structure refs are ok"; my $update = Search::InvertedIndex::Update->new({ -group => 'keywords', -index => 'http://www.nihongo.org/', -data => $index_data, -keys => { 'some' => 10, 'scalar' => 20, 'complex' => 15, 'structure' => 15, 'refs' => 15, 'are' => 15, 'ok' => 15, }, }); my $result = $inv_map->update({ -update => $update }); ########################################################## # Example Query # '-nodes' is an anon list of Search::InvertedIndex::Query # objects (this allows constructing complex booleans by # nesting). # # '-leafs' is an anon list of Search::InvertedIndex::Query::Leaf # objects (used for individual search terms). # ########################################################## my $query_leaf1 = Search::InvertedIndex::Query::Leaf->new({ -key => 'complex', -group => 'keywords', -weight => 1, }); my $query_leaf2 = Search::InvertedIndex::Query::Leaf->new({ -key => 'structure', -group => 'keywords', -weight => 1, }); my $query_leaf3 = Search::InvertedIndex::Query::Leaf->new({ -key => 'gold', -group => 'keywords', -weight => 1, }); my $query1 = Search::InvertedIndex::Query->new({ -logic => 'and', -weight => 1, -nodes => [], -leafs => , }); my $query2 = Search::InvertedIndex::Query->new({ -logic => 'or', -weight => 1, -nodes => , -leafs => , }); my $result = $inv_map->search({ -query => $query2 }); ########################################################## $inv_map->close;Requirements:· PerlWhat's New in This Release:· Patch to the MySQL database driver to accomodate changes in DBD::mysql.· Addition of a test for MySQL functionality.· Patch and test thanks to Kate L Pugh.


Search::InvertedIndex Related Software