Bug 22826 - Allow indexing of individual authority records in Elasticsearch
Summary: Allow indexing of individual authority records in Elasticsearch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nick Clemens (kidclamp)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-02 10:21 UTC by Nick Clemens (kidclamp)
Modified: 2021-06-14 21:29 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:


Attachments
Bug 22826: Allow indexing of individual authorities in Elasticsearch (3.12 KB, patch)
2019-05-02 10:25 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 22826: Allow indexing of individual authorities in Elasticsearch (3.17 KB, patch)
2019-05-03 20:18 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22826: Allow indexing of individual authorities in Elasticsearch (4.07 KB, patch)
2019-07-01 14:38 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 22826: Allow indexing of individual authorities in Elasticsearch (4.13 KB, patch)
2019-10-24 12:27 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2019-05-02 10:21:21 UTC
The help for rebuild_elastic_search.pl indicates

=item B<-bn|--bnumber>
 
Only index the supplied biblionumber, mostly for testing purposes. May be
repeated. This also applies to authorities via authid, so if you're using it,
you probably only want to do one or the other at a time.

However, attempting to index like:
perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92

Throws an error about calling the method 'id' on a MARC::Record
Comment 1 Nick Clemens (kidclamp) 2019-05-02 10:25:00 UTC
Created attachment 89218 [details] [review]
Bug 22826: Allow indexing of individual authorities in Elasticsearch

To test:
1 - perl misc/search_tools/rebuild_elastic_search.pl -h
2 - Note it indicates the bn option can be passed to index individual authids
3 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
4 - Note the error
5 - Apply patch
6 - perl misc/search_tools/rebuild_elastic_search.pl -h
7 - Note new option ai|authid for indexing individual authids
8 - Note updated text for bn|biblionumber option
9 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
10 - No errors, but no records indexed
11 - perl misc/search_tools/rebuild_elastic_search.pl -a -ai 92 -v
12 - 1 record indexed
13 - perl misc/search_tools/rebuild_elastic_search.pl -ai 92 -bn 92 -v
14 - 1 authority record and 1 biblio record indexed
Comment 2 Michal Denar 2019-05-03 20:18:46 UTC
Created attachment 89330 [details] [review]
Bug 22826: Allow indexing of individual authorities in Elasticsearch

To test:
1 - perl misc/search_tools/rebuild_elastic_search.pl -h
2 - Note it indicates the bn option can be passed to index individual authids
3 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
4 - Note the error
5 - Apply patch
6 - perl misc/search_tools/rebuild_elastic_search.pl -h
7 - Note new option ai|authid for indexing individual authids
8 - Note updated text for bn|biblionumber option
9 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
10 - No errors, but no records indexed
11 - perl misc/search_tools/rebuild_elastic_search.pl -a -ai 92 -v
12 - 1 record indexed
13 - perl misc/search_tools/rebuild_elastic_search.pl -ai 92 -bn 92 -v
14 - 1 authority record and 1 biblio record indexed

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 3 Katrin Fischer 2019-05-11 20:16:27 UTC
Patch no longer applies (I think with the changes for faster indexing). Can you please rebase?


Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 22826: Allow indexing of individual authorities in Elasticsearch
Using index info to reconstruct a base tree...
A	misc/search_tools/rebuild_elastic_search.pl
Falling back to patching base and 3-way merge...
Auto-merging misc/search_tools/rebuild_elasticsearch.pl
CONFLICT (content): Merge conflict in misc/search_tools/rebuild_elasticsearch.pl
error: Failed to merge in the changes.
Patch failed at 0001 Bug 22826: Allow indexing of individual authorities in Elasticsearch
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-22826-Allow-indexing-of-individual-authorities-ll6wzg.patch
Comment 4 Nick Clemens (kidclamp) 2019-07-01 14:38:05 UTC
Created attachment 91151 [details] [review]
Bug 22826: Allow indexing of individual authorities in Elasticsearch

To test:
1 - perl misc/search_tools/rebuild_elastic_search.pl -h
2 - Note it indicates the bn option can be passed to index individual authids
3 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
4 - Note the error
5 - Apply patch
6 - perl misc/search_tools/rebuild_elastic_search.pl -h
7 - Note new option ai|authid for indexing individual authids
8 - Note updated text for bn|biblionumber option
9 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
10 - No errors, but no records indexed
11 - perl misc/search_tools/rebuild_elastic_search.pl -a -ai 92 -v
12 - 1 record indexed
13 - perl misc/search_tools/rebuild_elastic_search.pl -ai 92 -bn 92 -v
14 - 1 authority record and 1 biblio record indexed

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 5 Martin Renvoize (ashimema) 2019-10-24 12:27:34 UTC
Created attachment 94660 [details] [review]
Bug 22826: Allow indexing of individual authorities in Elasticsearch

To test:
1 - perl misc/search_tools/rebuild_elastic_search.pl -h
2 - Note it indicates the bn option can be passed to index individual authids
3 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
4 - Note the error
5 - Apply patch
6 - perl misc/search_tools/rebuild_elastic_search.pl -h
7 - Note new option ai|authid for indexing individual authids
8 - Note updated text for bn|biblionumber option
9 - perl misc/search_tools/rebuild_elastic_search.pl -a -bn 92 -v
10 - No errors, but no records indexed
11 - perl misc/search_tools/rebuild_elastic_search.pl -a -ai 92 -v
12 - 1 record indexed
13 - perl misc/search_tools/rebuild_elastic_search.pl -ai 92 -bn 92 -v
14 - 1 authority record and 1 biblio record indexed

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2019-10-24 12:28:11 UTC
Works well, passes QA scripts.. Passing QA
Comment 7 Martin Renvoize (ashimema) 2019-10-28 12:45:45 UTC
Nice work!

Pushed to master for 19.11.00