Senna::Index - Interface to Senna's Index
use Senna::Index; # Export SEN_INDEX_* constants use Senna::Index qw(:flags); my $index = Senna::Index->open($path); # or my $index = Senna::Index->create($path, $flags, $n_segment, $encoding); $index->close(); $index->put($key, $value); $index->del($key, $value); $index->replace($key, $old_value, $new_value); my $cursor = $index->search($query); while (my $result = $cursor->fetch_next()) { $result->key(); $result->score(); } while ($cursor->next) { # or $cursor->rewind my $key = $cursor->key; my $score = $cursor->score; } $index->remove();
To install Senna, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Senna
CPAN shell
perl -MCPAN -e shell install Senna
For more information on module installation, please visit the detailed CPAN module installation guide.