Bugzilla – Attachment 16439 Details for
Bug 7440
Vestiges of NoZebra should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7440 follow-up removing forgotten NoZebra references
Bug-7440-follow-up-removing-forgotten-NoZebra-refe.patch (text/plain), 5.54 KB, created by
Paul Poulain
on 2013-03-19 17:27:59 UTC
(
hide
)
Description:
Bug 7440 follow-up removing forgotten NoZebra references
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2013-03-19 17:27:59 UTC
Size:
5.54 KB
patch
obsolete
>From e84c6a47a07530c35d2540731cde470fb7a9aed5 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Tue, 19 Mar 2013 18:19:31 +0100 >Subject: [PATCH] Bug 7440 follow-up removing forgotten NoZebra references > >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> >--- > C4/AuthoritiesMarc.pm | 69 +++++++------------- > C4/Search.pm | 8 --- > .../prog/en/modules/help/admin/stopwords.tt | 2 - > 3 files changed, 23 insertions(+), 56 deletions(-) > >diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm >index 008cfd5..e711e7e 100644 >--- a/C4/AuthoritiesMarc.pm >+++ b/C4/AuthoritiesMarc.pm >@@ -328,12 +328,6 @@ counts Usage of Authid in bibliorecords. > > sub CountUsage { > my ($authid) = @_; >- if (C4::Context->preference('NoZebra')) { >- # Read the index Koha-Auth-Number for this authid and count the lines >- my $result = C4::Search::NZanalyse("an=$authid"); >- my @tab = split /;/,$result; >- return scalar @tab; >- } else { > ### ZOOM search here > my $query; > $query= "an:".$authid; >@@ -344,7 +338,6 @@ sub CountUsage { > } > > return $result; >- } > } > > =head2 CountUsageChildren >@@ -1413,46 +1406,30 @@ sub merge { > my @reccache; > # search all biblio tags using this authority. > #Getting marcbiblios impacted by the change. >- if (C4::Context->preference('NoZebra')) { >- #nozebra way >- my $dbh=C4::Context->dbh; >- my $rq=$dbh->prepare(qq(SELECT biblionumbers from nozebra where indexname="an" and server="biblioserver" and value="$mergefrom" )); >- $rq->execute; >- while (my $biblionumbers=$rq->fetchrow){ >- my @biblionumbers=split /;/,$biblionumbers; >- foreach (@biblionumbers) { >- if ($_=~/(\d+),.*/) { >- my $marc=GetMarcBiblio($1); >- push @reccache,$marc; >- } >- } >- } >- } else { >- #zebra connection >- my $oConnection=C4::Context->Zconn("biblioserver",0); >- # We used to use XML syntax here, but that no longer works. >- # Thankfully, we don't need it. >- my $query; >- $query= "an=".$mergefrom; >- my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection )); >- my $count = 0; >- if ($oResult) { >- $count=$oResult->size(); >- } >- my $z=0; >- while ( $z<$count ) { >- my $rec; >- $rec=$oResult->record($z); >- my $marcdata = $rec->raw(); >- my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata); >- my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); >- my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield); >- my $marcrecorddb=GetMarcBiblio($i); >- push @reccache, $marcrecorddb; >- $z++; >- } >- $oResult->destroy(); >+ #zebra connection >+ my $oConnection=C4::Context->Zconn("biblioserver",0); >+ # We used to use XML syntax here, but that no longer works. >+ # Thankfully, we don't need it. >+ my $query; >+ $query= "an=".$mergefrom; >+ my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection )); >+ my $count = 0; >+ if ($oResult) { >+ $count=$oResult->size(); >+ } >+ my $z=0; >+ while ( $z<$count ) { >+ my $rec; >+ $rec=$oResult->record($z); >+ my $marcdata = $rec->raw(); >+ my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata); >+ my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' ); >+ my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield); >+ my $marcrecorddb=GetMarcBiblio($i); >+ push @reccache, $marcrecorddb; >+ $z++; > } >+ $oResult->destroy(); > #warn scalar(@reccache)." biblios to update"; > # Get All candidate Tags for the change > # (This will reduce the search scope in marc records). >diff --git a/C4/Search.pm b/C4/Search.pm >index e2df744..d3d3ce1 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1257,14 +1257,6 @@ sub buildQuery { > my $fuzzy_enabled = C4::Context->preference("QueryFuzzy") || 0; > my $remove_stopwords = C4::Context->preference("QueryRemoveStopwords") || 0; > >- # no stemming/weight/fuzzy in NoZebra >- if ( C4::Context->preference("NoZebra") ) { >- $stemming = 0; >- $weight_fields = 0; >- $fuzzy_enabled = 0; >- $auto_truncation = 0; >- } >- > my $query = $operands[0]; > my $simple_query = $operands[0]; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt >index 05e1640..8078532 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt >@@ -2,8 +2,6 @@ > > <h1>Stop Words</h1> > >-<p style="color: #990000">Important: If NoZebra is set to 'Use' this option will not appear on the administration menu</p> >- > <p>Stop words are words that you want the search system to ignore.</p> > > <p>Koha comes with a standard list of stop words that can be edited by visiting the Stop Word administration area.</p> >-- >1.7.9.5
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 7440
:
16134
|
16137
|
16138
|
16276
|
16277
|
16340
|
16341
|
16437
|
16438
| 16439