added lineage search

This commit is contained in:
JT Smith 2006-01-21 00:45:21 +00:00
parent 4b2c3ed925
commit 73b38f5498

View file

@ -152,6 +152,8 @@ sub rawClause {
A simple keyword search.
=head3 match
Should we match "any" or "all" of the keywords.
=head3 keywords
@ -174,6 +176,36 @@ sub search {
}
#-------------------------------------------------------------------
=head2 searchLimitLineage ( lineage, match, keywords )
A simple keyword search limiting the search to a particular lineage.
=head3 lineage
The lineage to limit the search to.
=head3 match
Should we match "any" or "all" of the keywords.
=head3 keywords
An array of the key words or phrases to match against.
=cut
sub searchLimitLineage {
my $self = shift;
my $lineage = shift;
$self->search(@_);
$self->{_query} = "lineage like ? and (".$self->{_query}.")";
my @params = @{$self->{_params}};
unshift(@params, $lineage.'%');
$self->{_params} = \@params;
}
#-------------------------------------------------------------------
=head2 session ( )