Koha-clms/Koha/SearchEngine
Nick Clemens ae937750a9
Bug 39079: Follow 'and_or' variable when passed to build_auth_query_compat
When building queries for matchign Zebra uses OR to combine searches - Elasticsearch
has been effectively using 'AND' - this patch checks whether and_or has been passed
and follows the variable when present.

To test:
1 - Have an import file of auths with multiple 035
2 - Setup an authority matching rule
    Search index: other-control-number
    Score: 1000
    Tag: 035
    Subfields: a
3 - Make sure Koha is using Elasticsearch
4 - Stage file without matching, import file
5 - Stage file again, using your matching rule
6 - Note all records match
7 - Setup Cataloging->Marc modification template
8 - Add an action to delete first 035 field
9 - Run it against the records you just imported
    You can use a report:
    SELECT authid FROM auth_header WHERE authid > #### (find the lowest new record number in batch you imported)
10 - Change matching rule in batch to none, then back to your rule
11 - No matches!
12 - Apply patch, restart all
13 - Set matchign rule to none, then back to your rule
14 - Matches!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised!
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-10-03 14:35:53 +02:00
..
Elasticsearch Bug 39079: Follow 'and_or' variable when passed to build_auth_query_compat 2025-10-03 14:35:53 +02:00
Zebra Bug 14007: Filter search result values to remove OpacHiddenItems values 2024-10-25 16:41:39 +02:00
Elasticsearch.pm Bug 36433: Plugin hook elasticsearch_to_document 2025-08-04 12:27:00 +02:00
Indexer.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
QueryBuilder.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Search.pm Bug 14007: Filter search result values to remove OpacHiddenItems values 2024-10-25 16:41:39 +02:00