From 9557fbd656ba69ea1fa9f3ae9bf3abfd371a43e1 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 28 Sep 2021 20:33:46 +0000 Subject: [PATCH] Bug 28484: (QA follow-up) POD fix Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- Koha/SearchEngine/Zebra/QueryBuilder.pm | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Koha/SearchEngine/Zebra/QueryBuilder.pm b/Koha/SearchEngine/Zebra/QueryBuilder.pm index 4e8063b08e..b0011d09a9 100644 --- a/Koha/SearchEngine/Zebra/QueryBuilder.pm +++ b/Koha/SearchEngine/Zebra/QueryBuilder.pm @@ -17,6 +17,25 @@ package Koha::SearchEngine::Zebra::QueryBuilder; # You should have received a copy of the GNU General Public License # along with Koha; if not, see . +=head1 NAME + +Koha::SearchEngine::Zebra::QueryBuilder - Zebra query objects from user-supplied queries +Several methods are pass-throughs to C4 methods or other methods here + +=head1 DESCRIPTION + +This provides the functions that take a user-supplied search query, and +provides something that can be given to Zebra to get answers. + +=head1 SYNOPSIS + + use Koha::SearchEngine::Zebra::QueryBuilder; + $builder = Koha::SearchEngine::Zebra::QueryBuilder->new({ index => $index }); + my $simple_query = $builder->build_query("hello"); + +=head1 METHODS + +=cut use Modern::Perl; use base qw(Class::Accessor); @@ -24,11 +43,24 @@ use base qw(Class::Accessor); use C4::Search; use C4::AuthoritiesMarc; +=head2 build_query + + Pass-through to C4::Search::buildQuery + +=cut + sub build_query { shift; C4::Search::buildQuery @_; } +=head2 build_query_compat + + my ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type) = + build_query_compat($operators, $operands, $indexes, $limits, $sort_by, $scan, $lang, $params) + +=cut + sub build_query_compat { my $self = shift; my ($operators, $operands, $indexes, $limits, $sort_by, $scan, $lang, $params) = @_; @@ -55,6 +87,12 @@ sub build_query_compat { return ($error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type); } +=head2 build_authorities_query + + my $query = build_authorities_query( \@query ); + +=cut + sub build_authorities_query { shift; return { @@ -68,6 +106,12 @@ sub build_authorities_query { }; } +=head2 build_authorities_query_compat + + Pass-through to build_authorities_query + +=cut + sub build_authorities_query_compat { # Pass straight through as well build_authorities_query(@_); -- 2.39.5