Lines 806-812
sub _convert_index_strings_freeform {
Link Here
|
806 |
# Lower case field names |
806 |
# Lower case field names |
807 |
$search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og; |
807 |
$search =~ s/($field_name_pattern)(?:,[\w-]*)?($multi_field_pattern):/\L$1\E$2:/og; |
808 |
# Resolve possible field aliases |
808 |
# Resolve possible field aliases |
809 |
$search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1)."$2:"/oge; |
809 |
$search =~ s/($field_name_pattern)($multi_field_pattern):/(exists $index_field_convert{$1} ? $index_field_convert{$1} : $1).($1 eq 'kw' ? "$2" : "$2:")/oge; |
810 |
return $search; |
810 |
return $search; |
811 |
} |
811 |
} |
812 |
|
812 |
|
Lines 1069-1074
sub _fix_limit_special_cases {
Link Here
|
1069 |
next unless defined($start) && defined($end); |
1069 |
next unless defined($start) && defined($end); |
1070 |
push @new_lim, "date-of-publication:[$start TO $end]"; |
1070 |
push @new_lim, "date-of-publication:[$start TO $end]"; |
1071 |
} |
1071 |
} |
|
|
1072 |
elsif( $l =~ /^search_filter:/ ){ |
1073 |
my ($filter_id) = ( $l =~ /^search_filter:(.*)$/ ); |
1074 |
my $search_filter = Koha::SearchFilters->find( $filter_id ); |
1075 |
next unless $search_filter; |
1076 |
my $expanded = $search_filter->expand_filter; |
1077 |
foreach my $e ( @{$self->_fix_limit_special_cases($expanded)} ) { |
1078 |
push @new_lim, $self->clean_search_term( $e ); |
1079 |
} |
1080 |
} |
1072 |
elsif ( $l =~ /^yr,st-numeric[=:]/ ) { |
1081 |
elsif ( $l =~ /^yr,st-numeric[=:]/ ) { |
1073 |
my ($date) = ( $l =~ /^yr,st-numeric[=:](.*)$/ ); |
1082 |
my ($date) = ( $l =~ /^yr,st-numeric[=:](.*)$/ ); |
1074 |
next unless defined($date); |
1083 |
next unless defined($date); |
1075 |
- |
|
|