Bug 26314: (follow-up) Make title search explicit

This patch updates the get_volumes_query search returned when
UseControlNumber is disabled such that it matches the query produced by
XSLT sheets by replacing the ->title accessor with the more specific
->subfield('245', "a") accessor to just take subfield `a` into account.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2021-10-18 18:06:32 +01:00 committed by Tomas Cohen Arazi
parent 6e49a8be26
commit 80a775d5f9
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -1722,7 +1722,7 @@ sub get_volumes_query {
}
}
else {
my $cleaned_title = $marc->title;
my $cleaned_title = $marc->subfield('245', "a");
$cleaned_title =~ tr|/||;
$cleaned_title = $builder->clean_search_term($cleaned_title);
$searchstr = "ti,phr:($cleaned_title)";