Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Search::InvertedIndex::Simple::BerkeleyDB 1.06

    Download button

    No screenshots available
    Downloads: 120  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Ron Savage | More programs
    Perl Artistic License / FREE
    April 28th, 2012, 19:08 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Search::InvertedIndex::Simple::BerkeleyDB description

    Build indexes for a set of search keys; Search using BerkeleyDB

    Search::InvertedIndex::Simple::BerkeleyDB is a pure Perl module.

    See the parent module Search::InvertedIndex::Simple for an explanation of the options dataset and keyset passed in to new().

    db_put() writes the index built by Search::InvertedIndex::Simple to an in-RAM database managed by BerkeleyDB.

    db_get($key) returns the results of a search as a hash ref.

    inflate($result) converts the result hash ref into a single object of type Set::Array.

    Synopsis

     my($dataset) = [
     { # Index: 0.
     address => 'Here',
     event => 'End',
     time => 'Time',
     },
     { # Index: 1.
     address => 'Heaven',
     event => 'Exit',
     time => 'Then',
     },
     { # Index: 2.
     address => 'House',
     event => 'Finish',
     time => 'Thus',
     }
     ];
     my($keyset) = [qw/address time/];
     my($db) = Search::InvertedIndex::Simple::BerkeleyDB -> new
     (
     dataset => $dataset,
     keyset => $keyset,
     );

     $db -> db_put();

     my($result) = $db -> db_get({address => 'Hea', time => 'T'}); # Returns a hashref.
     my($set) = $db -> inflate($result); # Returns a Set::Array object.

     print $set ? join(',', $set -> print() ) : 'Search did not find any matching records', ". \n";



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    BerkeleyDB search | Perl module | Perl | BerkeleyDB | search

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM