Lines 538-559
sub get_analytics_query {
Link Here
|
538 |
my $pf001 = $marc->field('001') || undef; |
538 |
my $pf001 = $marc->field('001') || undef; |
539 |
|
539 |
|
540 |
if ( defined($pf001) ) { |
540 |
if ( defined($pf001) ) { |
|
|
541 |
$searchstr = "("; |
541 |
my $pf003 = $marc->field('003') || undef; |
542 |
my $pf003 = $marc->field('003') || undef; |
542 |
|
543 |
|
543 |
if ( !defined($pf003) ) { |
544 |
if ( !defined($pf003) ) { |
544 |
# search for 773$w='Host001' |
545 |
# search for 773$w='Host001' |
545 |
$searchstr = "rcn:" . $pf001->data(); |
546 |
$searchstr .= "rcn:" . $pf001->data(); |
546 |
} |
547 |
} |
547 |
else { |
548 |
else { |
548 |
$searchstr = "("; |
549 |
$searchstr .= "("; |
549 |
# search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001') |
550 |
# search for (773$w='Host001' and 003='Host003') or 773$w='(Host003)Host001' |
550 |
$searchstr .= "(rcn:" . $pf001->data() . " AND cni:" . $pf003->data() . ")"; |
551 |
$searchstr .= "(rcn:" . $pf001->data() . " AND cni:" . $pf003->data() . ")"; |
551 |
$searchstr .= " OR rcn:" . $pf003->data() . " " . $pf001->data(); |
552 |
$searchstr .= " OR rcn:\"" . $pf003->data() . " " . $pf001->data() . "\""; |
552 |
$searchstr .= ")"; |
553 |
$searchstr .= ")"; |
553 |
} |
554 |
} |
554 |
|
555 |
|
555 |
# limit to monograph and serial component part records |
556 |
# limit to monograph and serial component part records |
556 |
$searchstr .= " AND (bib-level:a OR bib-level:b)"; |
557 |
$searchstr .= " AND (bib-level:a OR bib-level:b)"; |
|
|
558 |
$searchstr .= ")"; |
557 |
} |
559 |
} |
558 |
} |
560 |
} |
559 |
else { |
561 |
else { |
560 |
- |
|
|