[Koha-bugs] [Bug 33514] New: breaks ISBN search in item search
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 13 09:57:11 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33514
Bug ID: 33514
Summary: breaks ISBN search in item search
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Searching
Assignee: koha-bugs at lists.koha-community.org
Reporter: katrin.fischer at bsz-bw.de
QA Contact: testopia at bugs.koha-community.org
Depends on: 23919
Item search is SQL based, not search engine based. When bug 23919 added
SearchWithISSNVariations to item search, it broke all searches, but for one use
case (that was tested): single ISBN, no ISBD punctuation.
We are exploding the search now with up to 4 forms of ISBN into something like:
isbn like 'isbn1' or isbn like 'isbn2' ...
But: We are not truncating.
As soon as there is more than one ISBN (this is a repeatable field) or the
library actually follows MARC21 standard adding ISBD punctuation, this fails.
The data in biblioitems.isbn looks like this:
isbn1 ; | isbn2 ; | isbn3.
isbn1.
This also seems to create quite a performance issue on big databases and it
can't be turned off separately from the normal search.
I am not sure what is best, we could do something like this, which will make
the search work again, but I think we also should make it a separate switch:
@@ -1047,7 +1047,12 @@ sub _SearchItems_build_where_fragment {
if (
C4::Context->preference("SearchWithISBNVariations") and $query ) {
my @isbns = C4::Koha::GetVariationsOfISBN( $query );
$query = [];
+ foreach my $isbn(@isbns) {
+ $isbn = "%" . $isbn . "%";
+ }
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23919
[Bug 23919] Make ISSN searchable with and without hyphen
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list