
Metadata::DB::Search - search the indexed metadata

use Metadata::DB::Search;
use Metadata::DB;
my $s = Metadata::DB::Search->new({ DBH => $dbh });
$s->search({
age => 24,
'first_name:like' => 'jo',
'speed:morethan' => 40,
});
$s->ids_count or die('nothing found');
for(@$ids) {
my $o = new Metadata::DB({ DBH => $dbh, id => $_ });
}

my $s = Metadata::DB::Search->new({ DBH => $dbh });
$s->search_params_add( age => 24 );
$s->search_params_add( 'first_name:like' =>'jo' );
$s->search;
my @matching_ids = @{ $s->ids };
for my $id ( @matching_ids ){
}

What if you want to search other metadata table?
$s->table_name_metadata
$s->search({
age => 24,
'first_name:like' => 'jo',
});

returns how many search params we have
optional argument is a hash ref with search params these are key value pairs the value can be a string or an array ref
$s->search({
age => 25,
'name:exact' => ['larry','joe']
});
Possible search types for each attribute are like, exact, morethan, lessthan, default is like.
experimental, arg is number, may help speed up searches if set, possible num is 100?

returns array ref of matching ids, results, in metadata table that meet the criteria