[Koha-bugs] [Bug 32707] ElasticSearch should not auto truncate (even if QueryAutoTruncate = 1) for identifiers (and some other fields)
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Feb 17 13:36:22 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32707
--- Comment #5 from Janusz Kaczmarek <januszop at gmail.com> ---
(In reply to Fridolin Somers from comment #4)
> Looks like this is related to Bug 24143
>
> Please have a look.
>
> Don't you think we should avoid all query changes (truncation, ...) for
> search in identifiers ?
Yes, it is related. But Koha with Zebra queries with operands like
sn:<biblionumber>, an:<authid> will not be autotruncated: in C4::Search they
will be classified as ccl queries (lines 1234nn of the current master) and, as
a consequence, buildQuery will return in line 1345 (if ( $query =~ /^cql=/ )
...), before applying auto truncation. And auto truncation of standard
identifiers like ISBN, ISSN, where index name is not a part of operand, is
prevented by line 1421nn.
This behaviour is not reflected in ES build_query_compat.
And yes, I think we should avoid auto truncation and other automatic query
modifications for identifiers. A proposal of a list of identifiers is
hardcoded in the patch, in the method _is_safe_to_auto_truncate:
barcode biblioitemnumber control-number control-number-identifier
date-of-acquisition date-of-publication date-time-last-modified
host-item-number identifier-standard isbn issn itemnumber itype
koha-auth-number lc-card-number local-number number-local-acquisition
other-control-number record-control-number
Please, feel free to correct/extend the proposed patch.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list