]> git.koha-community.org Git - koha.git/commit
Bug 21908: Add DISTINCT biblionumber to rebuild_zebra.pl
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 29 Nov 2018 09:50:06 +0000 (10:50 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 12 Dec 2018 10:55:52 +0000 (10:55 +0000)
commit397f2e850ced3acaeb8d0f103694262ba339d63f
tree5632b062c8af8edcab9b73867cd748488bee037c
parent33b8f3ff1df670d4512695213d004b1a189f9c25
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a1b08269a7031417312e6265ace9ef5b995933fa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
misc/migration_tools/rebuild_zebra.pl