In search result we can select the Search Modes (and, or) but i am interested in use both, we would like to have the results that contains ALL the keywords first and then those who have ANY of the keywords.
I try to changing this :
# ... find some ids based upon the search type
if ( $self->{mode} == $SEARCH_MODES { and } ) {
$id_results = $self->_get_by_intersection ( $o );
} elsif ( $self->{mode} == $SEARCH_MODES { or } ) {
$id_results = $self->_get_by_union ( $o );
} else {
$self->_debug_message ("query: Unkown search mode, aborting!", 4);
return undef;
}
}
and i get the following error:
Can't use string ("HASH(0xf085fc)") as a HASH ref while "strict refs" in use at C:/Perl/lib/Links/Search.pm line 685.
any suggestions?? or what is the best way to do it??
tnks
Luis Fernando
I try to changing this :
# ... find some ids based upon the search type
if ( $self->{mode} == $SEARCH_MODES { and } ) {
$id_results = $self->_get_by_intersection ( $o );
} elsif ( $self->{mode} == $SEARCH_MODES { or } ) {
$id_results = $self->_get_by_union ( $o );
} else {
$self->_debug_message ("query: Unkown search mode, aborting!", 4);
return undef;
}
}
and i get the following error:
Can't use string ("HASH(0xf085fc)") as a HASH ref while "strict refs" in use at C:/Perl/lib/Links/Search.pm line 685.
any suggestions?? or what is the best way to do it??
tnks
Luis Fernando