Lines 796-802
sub _convert_index_strings_freeform {
Link Here
|
796 |
# Lower case field names |
796 |
# Lower case field names |
797 |
$search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og; |
797 |
$search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og; |
798 |
# Resolve possible field aliases |
798 |
# Resolve possible field aliases |
799 |
$search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1)."$2:"/oge; |
799 |
$search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1).($1 eq 'kw' ? "$2" : "$2:")/oge; |
800 |
return $search; |
800 |
return $search; |
801 |
} |
801 |
} |
802 |
|
802 |
|
Lines 1059-1064
sub _fix_limit_special_cases {
Link Here
|
1059 |
next unless defined($start) && defined($end); |
1059 |
next unless defined($start) && defined($end); |
1060 |
push @new_lim, "date-of-publication:[$start TO $end]"; |
1060 |
push @new_lim, "date-of-publication:[$start TO $end]"; |
1061 |
} |
1061 |
} |
|
|
1062 |
elsif( $l =~ /^search_filter:/ ){ |
1063 |
my ($filter_id) = ( $l =~ /^search_filter:(.*)$/ ); |
1064 |
my $search_filter = Koha::SearchFilters->find( $filter_id ); |
1065 |
next unless $search_filter; |
1066 |
my $expanded = $search_filter->expand_filter; |
1067 |
foreach my $e ( @{$self->_fix_limit_special_cases($expanded)} ) { |
1068 |
push @new_lim, $self->clean_search_term( $e ); |
1069 |
} |
1070 |
# push @new_lim, @{$self->_fix_limit_special_cases($expanded)}; |
1071 |
} |
1062 |
elsif ( $l =~ /^yr,st-numeric=/ ) { |
1072 |
elsif ( $l =~ /^yr,st-numeric=/ ) { |
1063 |
my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ ); |
1073 |
my ($date) = ( $l =~ /^yr,st-numeric=(.*)$/ ); |
1064 |
next unless defined($date); |
1074 |
next unless defined($date); |
1065 |
- |
|
|