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.
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
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
Created attachment 82817 [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
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>
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>
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>
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>
Created attachment 82954 [details] [review] Bug 21908: (QA follow-up) Remove useless parentheses in query Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.01
backported to 18.05 for 18.05.08
Pushed to 17.11.x for 17.11.14