Main Koha release repository https://koha-community.org
Find a file
David Cook b2a23149bd
Bug 20596: Join authority queries together with OR
This patch joins authority queries together with OR like Elasticsearch.

To the best of the author's knowledge, this code only gets triggered
when using record matching rules, but there may be other situations
where it's used.

Authority search in cataloguing plugins use a different path, and
authority search in authority home doesn't allow multiple queries,
so they'll never trigger this OR joining of queries.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Create a record matching rule with the following:
Matching rule code: NID
Description: NormdatenID
Match threshold: 100
Record type: Authority record
Search index: Any
Score: 101
Tag: 035
Subfields: a
Offset: 0
Length: 0
Normalization rule: None

Click "Remove this match check"

2. Stage gnd.xml (from BZ 20596 attachments)
- Choose "MARCXML" for "Format"
- Choose "Authority" for "Record type"
- Choose "NID" for "Record matching rule"
- Click "Stage for import"
3. Note the job gets to "100% Finished"
(Before this patch, it would say "0% Failed")

4. View the batch
5. Import the record
6. Repeat steps 2-4 and note that the record matching rule
worked

7. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl
8. Search for "e"
9. Note that the search works

10. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
11. Click tab 6
12. Click on the tag editor next to "a Personal Name"
13. Type "e" into each box and click "Search"
14. Note that the search works

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:52:16 -03:00
acqui Bug 32457: Fix CGI vulnerability in addorder.pl 2022-12-14 15:07:09 -03:00
admin Bug 30794: Insert blank rule (unlimited) for max_holds 2022-11-22 09:08:16 -03:00
api Bug 31160: Required fields in patron api 2022-12-13 08:44:35 -03:00
authorities Bug 30250: Use ApplyFrameworkDefaults when importing a record 2022-11-09 14:03:22 -03:00
basket
bin
C4 Bug 20596: Join authority queries together with OR 2022-12-15 09:52:16 -03:00
catalogue Bug 31543: Use query string, rather than query, to build link 2022-11-16 15:57:28 -03:00
cataloguing Bug 24606: (QA follow-up) Remove duplicate include 2022-11-11 15:47:36 -03:00
circ Bug 30963: Automatically refresh the curbside pickups list 2022-12-01 09:34:48 -03:00
clubs
course_reserves
debian Bug 31675: Remove packages from debian/control that are no longer used 2022-12-07 14:20:54 -03:00
docs 22.11.00: Update history.txt 2022-11-25 15:20:02 -03:00
erm Bug 32030: Add missing sponsors 2022-11-09 12:25:44 -03:00
errors
etc Bug 32030: Add Apache RewriteRule 2022-11-08 09:43:48 -03:00
ill
installer Koha 22.12 - start of a new dev cycle 2022-11-28 15:26:01 -03:00
Koha Bug 32394: Restore long tasks queue 2022-12-14 14:32:27 -03:00
koha-tmpl Bug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers 2022-12-15 09:43:20 -03:00
labels
lib/CGI/Session/Serialize
members Bug 32119: (bug 31422 follow-up) Fix add guarantee 2022-11-07 11:09:56 -03:00
misc Translation updates for Koha 22.11.00 2022-11-25 15:20:05 -03:00
offline_circ
opac Bug 31543: Use query string, rather than query, to build link 2022-11-16 15:57:28 -03:00
patron_lists
patroncards
plugins
pos
recalls
reports
reserve
reviews
rotating_collections
serials
services
skel
suggestion
svc Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl 2022-11-04 19:39:57 -03:00
t Bug 32394: Add tests 2022-12-14 14:32:27 -03:00
tags
tmp/modified_authorities
tools Bug 31711: (bug 27421 follow-up) Fix add to basket from a new file 2022-11-15 18:44:30 -03:00
virtualshelves
xt Bug 32352: Make xt/check_makefile.t check directories in git index 2022-11-28 15:37:14 -03:00
.editorconfig
.eslintrc.json
.gitignore Bug 32030: Add dist dir to .gitignore 2022-11-08 09:49:57 -03:00
.htaccess
.mailmap 22.11.00: Update .mailmap 2022-11-25 15:20:01 -03:00
.perlcriticrc
.proverc.dist
.stylelintrc.json
about.pl Bug 30808: Add support for version codenames 2022-11-25 15:20:00 -03:00
app.psgi
changelanguage.pl
cpanfile Bug 12758: Make LWP::Protocol::https required module 2022-11-09 09:52:13 -03:00
cypress.json Bug 32030: Move cypress to t/ 2022-11-08 09:44:51 -03:00
fix-perl-path.PL
gulpfile.js Bug 32422: Hardcoded paths in _common.scss precent using external node_modules 2022-12-12 12:19:10 -03:00
help.pl
INSTALL
Koha.pm Koha 22.12 - start of a new dev cycle 2022-11-28 15:26:01 -03:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL Bug 32030: Fix Makefile.t 2022-11-09 09:48:30 -03:00
MANIFEST.SKIP
package.json Bug 32212: (bug 32030 follow-up) Restore bootstrap 4 2022-11-17 14:49:07 -03:00
README
README.md
README.robots
rewrite-config.PL
tsconfig.json Bug 32030: Move cypress to t - fix build_js/watch_js 2022-11-08 09:44:52 -03:00
webpack.config.js Bug 32030: Move cypress to t/ 2022-11-08 09:44:51 -03:00
yarn.lock Bug 32212: Updated yarn.lock 2022-11-18 12:04:29 -03:00

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo