From 2e0495aa8095be8ec8a07598650f793605d786c4 Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 19 Aug 2022 11:50:05 +0200 Subject: [PATCH] Bug 25870 - (follow-up) Removed Data::Dumper + call I refactored the controller code but unfortunately still haven't figured out why Koha::Biblios->search doesn't work properly. For the time being I still use Koha::Biblios->find. That aside I think it has become much cleaner now. To test: 1) Apply the patch 2) Pick an endpoint tester of your choice, e.g. Insomnia or the ThunderClient if you use VSCode or derivatives. 3) Run a query while using Zebra. 4) Observe the marc-in-json response and check for validity. 5) Run a query while using Elasticsearch. 6) Again, observe the marc-in-json response and check for validity. 7) Not ready for sign-off but please leave a comment or help me on the Koha::Biblios->search thing. --- Koha/REST/V1/Biblios.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm index 1b45f8078b..15e8e939ed 100644 --- a/Koha/REST/V1/Biblios.pm +++ b/Koha/REST/V1/Biblios.pm @@ -28,8 +28,6 @@ use List::MoreUtils qw( any ); use MARC::Record::MiJ; use Try::Tiny qw( catch try ); -use JSON; -use Data::Dumper; =head1 API @@ -159,8 +157,6 @@ sub get_biblios_public { my $searcher = Koha::SearchEngine::Search->new( { index => 'biblios' } ); my $query = $c->validation->param('q_ccl'); - warn Dumper($query); - my ( $error, $results, $total_hits ) = $searcher->simple_search_compat( $query, 0, undef ); if ( !$total_hits ) { @@ -200,7 +196,6 @@ sub get_biblios_public { }; } - =head3 get_public Controller function that handles retrieving a single biblio object -- 2.31.1