Bugzilla – Attachment 82953 Details for
Bug 21908
biblio_metadata is missing from the rebuild_zebra.pl tables list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl
Bug-21908-Add-DISTINCT-biblionumber-to-rebuildzebr.patch (text/plain), 1.70 KB, created by
Julian Maurice
on 2018-12-07 09:38:16 UTC
(
hide
)
Description:
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-12-07 09:38:16 UTC
Size:
1.70 KB
patch
obsolete
>From 893bb8d0819f7a30e02c3dc3c1bc8bee1a5fb5af Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 29 Nov 2018 10:50:06 +0100 >Subject: [PATCH] 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> >--- > misc/migration_tools/rebuild_zebra.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/migration_tools/rebuild_zebra.pl b/misc/migration_tools/rebuild_zebra.pl >index c594087fff..c193d62e9e 100755 >--- a/misc/migration_tools/rebuild_zebra.pl >+++ b/misc/migration_tools/rebuild_zebra.pl >@@ -476,7 +476,7 @@ sub select_all_authorities { > sub select_all_biblios { > $table = 'biblioitems' > unless grep { /^$table$/ } @tables_allowed_for_select; >- my $strsth = qq{ SELECT biblionumber FROM $table }; >+ my $strsth = qq{ SELECT DISTINCT(biblionumber) FROM $table }; > $strsth.=qq{ WHERE $where } if ($where); > $strsth.=qq{ LIMIT $length } if ($length && !$offset); > $strsth.=qq{ LIMIT $offset,$length } if ($offset); >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21908
:
82723
|
82724
|
82817
|
82818
|
82819
|
82952
| 82953 |
82954