Bug 21908 - biblio_metadata is missing from the rebuild_zebra.pl tables list
Summary: biblio_metadata is missing from the rebuild_zebra.pl tables list
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 17196
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-29 09:13 UTC by Fridolin Somers
Modified: 2020-01-06 20:14 UTC (History)
7 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:


Attachments
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables (2.04 KB, patch)
2018-11-29 09:57 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl (1.57 KB, patch)
2018-11-29 09:57 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables (2.03 KB, patch)
2018-11-30 20:31 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables (2.10 KB, patch)
2018-11-30 20:45 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl (1.63 KB, patch)
2018-11-30 20:45 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables (2.17 KB, patch)
2018-12-07 09:38 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl (1.70 KB, patch)
2018-12-07 09:38 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 21908: (QA follow-up) Remove useless parentheses in query (1.06 KB, patch)
2018-12-07 09:38 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2018-11-29 09:13:47 UTC
Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
It is missing biblio_metadata to allow filtering on MARCXML with ExtractValue.

Also when using table=items we should use DISTINCT(biblionumber) to avoid indexing several times the same biblio record when it has several items.
Comment 1 Fridolin Somers 2018-11-29 09:57:08 UTC
Created attachment 82723 [details] [review]
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
It is missing biblio_metadata to allow filtering on MARCXML with ExtractValue.

Test plan :
1) Be sur you have a biblio record with biblionumber 1
2) Run misc/migration_tools/rebuild_zebra.pl -h
3) You see : --table specify a table (can be items, biblioitems, biblio, biblio_metadata) to retrieve biblionumber to index.
4) Run misc/migration_tools/rebuild_zebra.pl -v -b --table biblio_metadata --where="biblio_metadata.biblionumber=1"
5) Check you dont have SQL errors
Comment 2 Fridolin Somers 2018-11-29 09:57:28 UTC
Created attachment 82724 [details] [review]
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
When using table=items we should use DISTINCT(biblionumber) to avoid indexing several times the same biblio record when it has several items.
This patch adds DISTINCT(biblionumber) in all cases it does not harm if its already unique.

Test plan :
1) Be sur you have a biblio record with biblionumber 1 with 3 items
2) Run misc/migration_tools/rebuild_zebra.pl -v -b --table items --where="biblionumber=1"
3) Without patch you see "Records exported: 3", with patch only one
4) Check indexing works well
Comment 3 Pierre-Marc Thibault 2018-11-30 20:31:07 UTC Comment hidden (obsolete)
Comment 4 Pierre-Marc Thibault 2018-11-30 20:45:14 UTC
Created attachment 82818 [details] [review]
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
It is missing biblio_metadata to allow filtering on MARCXML with ExtractValue.

Test plan :
1) Be sur you have a biblio record with biblionumber 1
2) Run misc/migration_tools/rebuild_zebra.pl -h
3) You see : --table specify a table (can be items, biblioitems, biblio, biblio_metadata) to retrieve biblionumber to index.
4) Run misc/migration_tools/rebuild_zebra.pl -v -b --table biblio_metadata --where="biblio_metadata.biblionumber=1"
5) Check you dont have SQL errors

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 5 Pierre-Marc Thibault 2018-11-30 20:45:27 UTC
Created attachment 82819 [details] [review]
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
When using table=items we should use DISTINCT(biblionumber) to avoid indexing several times the same biblio record when it has several items.
This patch adds DISTINCT(biblionumber) in all cases it does not harm if its already unique.

Test plan :
1) Be sur you have a biblio record with biblionumber 1 with 3 items
2) Run misc/migration_tools/rebuild_zebra.pl -v -b --table items --where="biblionumber=1"
3) Without patch you see "Records exported: 3", with patch only one
4) Check indexing works well

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 6 Julian Maurice 2018-12-07 09:38:12 UTC
Created attachment 82952 [details] [review]
Bug 21908: Add biblio_metadata to rebuild_zebra.pl tables

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
It is missing biblio_metadata to allow filtering on MARCXML with ExtractValue.

Test plan :
1) Be sur you have a biblio record with biblionumber 1
2) Run misc/migration_tools/rebuild_zebra.pl -h
3) You see : --table specify a table (can be items, biblioitems, biblio, biblio_metadata) to retrieve biblionumber to index.
4) Run misc/migration_tools/rebuild_zebra.pl -v -b --table biblio_metadata --where="biblio_metadata.biblionumber=1"
5) Check you dont have SQL errors

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Julian Maurice 2018-12-07 09:38:16 UTC
Created attachment 82953 [details] [review]
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl

Zebra indexing script misc/migration_tools/rebuild_zebra.pl as a table arg to allow filtering.
When using table=items we should use DISTINCT(biblionumber) to avoid indexing several times the same biblio record when it has several items.
This patch adds DISTINCT(biblionumber) in all cases it does not harm if its already unique.

Test plan :
1) Be sur you have a biblio record with biblionumber 1 with 3 items
2) Run misc/migration_tools/rebuild_zebra.pl -v -b --table items --where="biblionumber=1"
3) Without patch you see "Records exported: 3", with patch only one
4) Check indexing works well

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Julian Maurice 2018-12-07 09:38:20 UTC
Created attachment 82954 [details] [review]
Bug 21908: (QA follow-up) Remove useless parentheses in query

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 9 Nick Clemens 2018-12-11 20:58:30 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2018-12-12 10:56:39 UTC
Pushed to 18.11.x for 18.11.01
Comment 11 Lucas Gass 2018-12-21 21:05:46 UTC
backported to 18.05 for 18.05.08
Comment 12 Fridolin Somers 2019-01-02 09:25:29 UTC
Pushed to 17.11.x for 17.11.14