NAME
KSx::IndexManager::Plugin::Partition
SYNOPSIS
package MyManager;
use base qw(KSx::IndexManager);
__PACKAGE__->add_plugins(
Partition => { key => 'type' },
Partition => { key => 'id' },
);
package main;
my $mgr = MyManager->new({
path => "/path/to/dir",
context => { type => 'animal', id => 17 },
});
# both now look in /path/to/dir/animal/17
my $invindexer = $mgr->invindexer;
my $searcher = $mgr->searcher;
METHODS
new
Takes a hashref with one of three keys:
- key
-
uses the context as a hashref and looks up the given key
- method
-
uses the context as an object and calls the given method
- code
-
passes the context to the given subref
alter_path
Changes the path with data from $mgr->context
.