$value =~ s/\pC+//sgo;
$value =~ s/\W+$//sgo;
+ # hack to normalize ratio-like strings
+ while ($term =~ /\b\d{1}:[, ]?\d+(?:[ ,]\d+[^:])+/o) {
+ $term = $` . join ('', split(/[, ]/, $&)) . $';
+ }
+
$value =~ s/\b\.+\b//sgo;
$value = lc($value);
# Add this data to the default search class
my $type = $arghash->{default_class} || 'keyword';
$type = ($type eq '-') ? 'keyword' : $type;
- $type = ($type !~ /^(title|author|keyword|subject|series)$/o) ? 'keyword' : $type;
+ $type = ($type !~ /^(title|author|keyword|subject|series)(?:\|\w+)?$/o) ? 'keyword' : $type;
$search->{$type} = {} unless $search->{$type};
$search->{$type}->{term} =
($search->{$type}->{term}) ? $search->{$type}->{term} . " $query" : $query;
$term =~ s/(\pM+)//gos;
$term =~ s/(\b\.\b)//gos;
+
+ # hack to normalize ratio-like strings
+ while ($term =~ /\b\d{1}:[, ]?\d+(?:[ ,]\d+[^:])+/o) {
+ $term = $` . join ('', split(/[, ]/, $&)) . $';
+ }
+
$self->decompose($term);
my $newterm = '';
function rresultCollectIds() {
var ids;
- switch(getRtype()) {
+ var rtype = getRtype();
+ if (rtype.indexOf('|') > -1)
+ rtype = rtype.substring(0,rtype.indexOf('|'));
+
+ switch(rtype) {
case RTYPE_COOKIE:
ids = JSON2js(cookieManager.read(COOKIE_RIDS));