While the ES index is incremental and provides results as it commits, we currently index from the oldest records to the newest. It would be nice to provide the option to go the other direction
Created attachment 107955 [details] [review] Bug 26180: Add descending option to rebuild_elasticsearch.pl TO test: 1 - Have ES setup and running for Koha 2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 3 - Note the biblios index from number 1 the end 4 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 5 - Notice the same 6 - Apply patch 7 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 8 - Still in ascending order 9 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b --desc 10 - Now records index in descending order 11 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 12 - Still ascending 13 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a --desc 14 - Now descending
Created attachment 112146 [details] [review] Bug 26180: Add descending option to rebuild_elasticsearch.pl TO test: 1 - Have ES setup and running for Koha 2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 3 - Note the biblios index from number 1 the end 4 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 5 - Notice the same 6 - Apply patch 7 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 8 - Still in ascending order 9 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b --desc 10 - Now records index in descending order 11 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 12 - Still ascending 13 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a --desc 14 - Now descending Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 112159 [details] [review] Bug 26180: Add descending option to rebuild_elasticsearch.pl TO test: 1 - Have ES setup and running for Koha 2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 3 - Note the biblios index from number 1 the end 4 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 5 - Notice the same 6 - Apply patch 7 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 8 - Still in ascending order 9 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b --desc 10 - Now records index in descending order 11 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 12 - Still ascending 13 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a --desc 14 - Now descending Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works well, Passing QA
Created attachment 112976 [details] [review] Bug 26180: Add descending option to rebuild_elasticsearch.pl While the ES index is incremental and provides results as it commits, we currently index from the oldest records to the newest. This patch provides the option to go the other direction To test: 1 - Have ES setup and running for Koha 2 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 3 - Note the biblios index from number 1 the end 4 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 5 - Notice the same 6 - Apply patch 7 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b 8 - Still in ascending order 9 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -b --desc 10 - Now records index in descending order 11 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a 12 - Still ascending 13 - perl misc/search_tools/rebuild_elasticsearch.pl -v -v -a --desc 14 - Now descending Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> JD amended patch: fix typo "inde" vs "index" and add commit body
Pushed to master for 20.11, thanks to everybody involved!
enhancement will not be backported to 20.05.x