Using ES and QueryAutoTruncate systempreference enabled, the count and list of linked biblios is wrong. This is because auto-truncate feature change the query "an:1" to "an:1*". So all biblio linked to an authid like 15, 1042, 11234 match the query.
Created attachment 111212 [details] [review] Bug 26608: Elasticsearch - add exact (ext) field type and use it for linked biblios Test plan: - Enable Elasticsearch engine, - Enable QueryAutoTruncate systempreference, - Show the detail od authority #1 (cgi-bin/koha/authorities/detail.pl?authid=1) - note the inconsistent count of linked biblio (and so the list), - Apply this patch, - Restart all, - repeat previous step, - Count and list of linked biblios should be ok.
*** Bug 29724 has been marked as a duplicate of this bug. ***
Just realized that the problem also occurs at linked_biblionumbers. https://github.com/Koha-Community/Koha/blob/master/Koha/Authorities.pm#L81 Basically, when simple_search_compat is used, instead of id "1" , its searched "1*". This returns all biblios with authorities that starts with the number 1.
I've changed the status to "Needs Signoff"
Patch no longer applies 8-(... Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 26608: Elasticsearch - add exact (ext) field type and use it for linked biblios Using index info to reconstruct a base tree... M Koha/Authorities.pm M Koha/SearchEngine/Elasticsearch/QueryBuilder.pm M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt Auto-merging Koha/SearchEngine/Elasticsearch/QueryBuilder.pm CONFLICT (content): Merge conflict in Koha/SearchEngine/Elasticsearch/QueryBuilder.pm Auto-merging Koha/Authorities.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 26608: Elasticsearch - add exact (ext) field type and use it for linked biblios
For me this bug doesn't exist anymore in master, and so, could be closed. In PRO, authorities-home.pl page display valid authorities usage count. On the other hand, a similar issue persists in OPAC: see bug 33802.