added lineage search
This commit is contained in:
parent
4b2c3ed925
commit
73b38f5498
1 changed files with 32 additions and 0 deletions
|
|
@ -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 ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue