|
Lines 194-200
sub _search {
Link Here
|
| 194 |
my $self = shift; |
194 |
my $self = shift; |
| 195 |
my $index = shift || undef; |
195 |
my $index = shift || undef; |
| 196 |
my $skipmetadata = shift || undef; |
196 |
my $skipmetadata = shift || undef; |
| 197 |
my $ind2 = $self->{field}->{_ind2}; |
197 |
my $thesaurus = $self->{thesaurus}; |
| 198 |
my $subject_heading_thesaurus = ''; |
198 |
my $subject_heading_thesaurus = ''; |
| 199 |
my @marclist; |
199 |
my @marclist; |
| 200 |
my @and_or; |
200 |
my @and_or; |
|
Lines 209-231
sub _search {
Link Here
|
| 209 |
push @value, $self->{'search_form'}; |
209 |
push @value, $self->{'search_form'}; |
| 210 |
} |
210 |
} |
| 211 |
|
211 |
|
| 212 |
if ($self->{'thesaurus'}) { |
212 |
if ( $thesaurus ) { |
| 213 |
if ($ind2 eq '0') { |
213 |
# This is calculated in C4/Heading/MARC21.pm - not used for UNIMARC |
|
|
214 |
if ($thesaurus eq 'lcsh') { |
| 214 |
$subject_heading_thesaurus = 'a'; |
215 |
$subject_heading_thesaurus = 'a'; |
| 215 |
} elsif ($ind2 eq '1') { |
216 |
} elsif ($thesaurus eq 'lcac') { |
| 216 |
$subject_heading_thesaurus = 'b'; |
217 |
$subject_heading_thesaurus = 'b'; |
| 217 |
} elsif ($ind2 eq '2') { |
218 |
} elsif ($thesaurus eq 'mesh') { |
| 218 |
$subject_heading_thesaurus = 'c'; |
219 |
$subject_heading_thesaurus = 'c'; |
| 219 |
} elsif ($ind2 eq '3') { |
220 |
} elsif ($thesaurus eq 'nal') { |
| 220 |
$subject_heading_thesaurus = 'd'; |
221 |
$subject_heading_thesaurus = 'd'; |
| 221 |
} elsif ($ind2 eq '4') { |
222 |
} elsif ($thesaurus eq 'notspecified') { |
| 222 |
$subject_heading_thesaurus = 'n'; |
223 |
$subject_heading_thesaurus = 'n'; |
| 223 |
} elsif ($ind2 eq '5') { |
224 |
} elsif ($thesaurus eq 'cash') { |
| 224 |
$subject_heading_thesaurus = 'k'; |
225 |
$subject_heading_thesaurus = 'k'; |
| 225 |
} elsif ($ind2 eq '6') { |
226 |
} elsif ($thesaurus eq 'rvm') { |
| 226 |
$subject_heading_thesaurus = 'v'; |
227 |
$subject_heading_thesaurus = 'v'; |
| 227 |
} else { |
228 |
} else { # We stored the value from $7 as the thesaurus if there was one |
| 228 |
$subject_heading_thesaurus = 'z'; |
229 |
$subject_heading_thesaurus = 'z'; |
|
|
230 |
push @marclist, 'thesaurus-conventions'; |
| 231 |
push @and_or, 'and'; |
| 232 |
push @excluding, ''; |
| 233 |
push @operator, 'is'; |
| 234 |
push @value, $self->{'thesaurus'}; |
| 229 |
} |
235 |
} |
| 230 |
push @marclist, 'thesaurus'; |
236 |
push @marclist, 'thesaurus'; |
| 231 |
push @and_or, 'and'; |
237 |
push @and_or, 'and'; |
|
Lines 234-247
sub _search {
Link Here
|
| 234 |
push @value, $subject_heading_thesaurus; |
240 |
push @value, $subject_heading_thesaurus; |
| 235 |
} |
241 |
} |
| 236 |
|
242 |
|
| 237 |
if ($ind2 eq '7') { |
|
|
| 238 |
push @marclist, 'thesaurus-conventions'; |
| 239 |
push @and_or, 'and'; |
| 240 |
push @excluding, ''; |
| 241 |
push @operator, 'is'; |
| 242 |
push @value, $self->{'thesaurus'}; |
| 243 |
} |
| 244 |
|
| 245 |
require Koha::SearchEngine::QueryBuilder; |
243 |
require Koha::SearchEngine::QueryBuilder; |
| 246 |
require Koha::SearchEngine::Search; |
244 |
require Koha::SearchEngine::Search; |
| 247 |
|
245 |
|
| 248 |
- |
|
|