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