Bugzilla – Attachment 35654 Details for
Bug 12478
Elasticsearch support for Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12478: fix some compilation errors
Bug-12478-fix-some-compilation-errors.patch (text/plain), 3.71 KB, created by
Jonathan Druart
on 2015-02-02 15:27:14 UTC
(
hide
)
Description:
Bug 12478: fix some compilation errors
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-02-02 15:27:14 UTC
Size:
3.71 KB
patch
obsolete
>From bdd7394c917e3f6b1914416fc17ddd8b0e173433 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 2 Feb 2015 16:19:02 +0100 >Subject: [PATCH] Bug 12478: fix some compilation errors > >syntax error at >/home/koha/src/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 341, >near "confess "Invalid marclist field provided: $m" > >Global symbol "$sort_order" requires explicit package name at >/home/koha/src/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 360. > >Can't locate object method "new" via package >"Koha::ElasticSearch::Search" (perhaps you forgot to load >"Koha::ElasticSearch::Search"?) at /home/koha/src/opac/opac-search.pl >line 54. > >Can't locate object method "new" via package >"Koha::SearchEngine::Elasticsearch::Search" (perhaps you forgot to load >"Koha::SearchEngine::Elasticsearch::Search"?) at >/home/koha/src/opac/opac-search.pl line 54. >--- > Koha/Biblio.pm | 2 +- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 5 +++-- > Koha/SearchEngine/Elasticsearch/Search.pm | 2 +- > opac/opac-search.pl | 4 ++-- > 4 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 480b716..a044dea 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -112,7 +112,7 @@ sub get_all_biblios_iterator { > my $database = Koha::Database->new(); > my $schema = $database->schema(); > my $rs = >- $schema->resultset('Biblioitem')->search( { marc => { '!=', undef } }, >+ $schema->resultset('Biblioitem')->search( { marc => { '!=', undef }, biblionumber => {'=', 3} }, > { columns => [qw/ biblionumber marc /] } ); > my $next_func = sub { > my $row = $rs->next(); >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 06780f8..d451f29 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -40,6 +40,7 @@ provides something that can be given to elasticsearch to get answers. > =cut > > use base qw(Class::Accessor); >+use Carp qw( confess ); > use List::MoreUtils qw/ each_array /; > use Modern::Perl; > use URI::Escape; >@@ -356,10 +357,10 @@ sub build_authorities_query_compat { > : ( $orderby =~ /^Auth/ ) ? 'Local-Number' > : undef; > if ($sort_field) { >- $sort_order = ( $orderby =~ /Asc$/ ) ? 'asc' : 'desc'; >+ my $sort_order = ( $orderby =~ /Asc$/ ) ? 'asc' : 'desc'; > %sort = ( $orderby => $sort_order, ); > } >- %search = ( >+ my %search = ( > searches => \@searches, > authtypecode => $authtypecode, > ); >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index 57a03f1..215404b 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -1,4 +1,4 @@ >-package Koha::SearchEngine::ElasticSearch::Search; >+package Koha::SearchEngine::Elasticsearch::Search; > > # Copyright 2014 Catalyst IT > # >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 0fd3e9a..bd45e55 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -32,7 +32,7 @@ use List::MoreUtils q/any/; > > use Data::Dumper; # TODO remove > >-use Koha::ElasticSearch::Search; >+use Koha::SearchEngine::Elasticsearch::Search; > use Koha::SearchEngine::QueryBuilder; > use Koha::SearchEngine::Zebra::Search; > >@@ -51,7 +51,7 @@ for ( $searchengine ) { > } > when (/^Elasticsearch$/) { > # TODO refactor Koha::ES::Search into Koha::SE::ES::Search >- $searcher=Koha::ElasticSearch::Search->new({index => 'biblios'}); >+ $searcher=Koha::SearchEngine::Elasticsearch::Search->new({index => 'biblios'}); > } > } > >-- >2.1.0
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 12478
:
29204
|
31128
|
31129
|
33136
|
33137
|
33138
|
33139
|
33140
|
33141
|
35654
|
40903
|
42030
|
42031
|
42032
|
42033
|
42062
|
42063
|
42064
|
42065
|
42066
|
42067
|
42068
|
42069
|
42392
|
42393
|
43127
|
43128
|
43129
|
43130
|
43131
|
43132
|
43133
|
43134
|
43140
|
43141
|
43142
|
43148
|
43345
|
43346
|
43347
|
43348
|
43349
|
43350
|
43351
|
43352
|
43373
|
47767
|
47768
|
50115
|
50159
|
50211
|
50212
|
50213
|
50214
|
50245
|
50246
|
50291
|
50292