Bug 7440 - Vestiges of NoZebra should be removed
Summary: Vestiges of NoZebra should be removed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P3 major (vote)
Assignee: Galen Charlton
QA Contact: Ian Walls
URL:
Keywords:
Depends on: 6227 8724
Blocks: 9234 9819 15526
  Show dependency treegraph
 
Reported: 2012-01-12 16:50 UTC by Jared Camins-Esakov
Modified: 2016-01-11 10:31 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 7440 - Remove NoZebra vestiges (142.26 KB, patch)
2013-03-14 17:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 7440 - Remove NoZebra vestiges (141.87 KB, patch)
2013-03-14 18:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs (1.19 KB, patch)
2013-03-14 18:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 7440 - Remove NoZebra vestiges (138.45 KB, patch)
2013-03-18 16:13 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs (1.23 KB, patch)
2013-03-18 16:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7440 - Remove NoZebra vestiges (138.51 KB, patch)
2013-03-19 09:46 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs (1.30 KB, patch)
2013-03-19 09:46 UTC, Julian Maurice
Details | Diff | Splinter Review
[PATCH] Bug 7440 - Remove NoZebra vestiges (138.54 KB, patch)
2013-03-19 17:27 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs (1.34 KB, patch)
2013-03-19 17:27 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 7440 follow-up removing forgotten NoZebra references (5.54 KB, patch)
2013-03-19 17:27 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2012-01-12 16:50:48 UTC
NoZebra has been deprecated since 3.4.0. It is time to remove the vestiges of NoZebra from the code and eliminate the syspref so that people stop thinking they can use it.
Comment 1 Magnus Enger 2012-01-13 12:10:44 UTC
Just saw that Makefile.PL still has this: 

 884     $msg = q(
 885 Koha can use the Zebra search engine for high-performance
 886 searching of bibliographic and authority records.  If you
 887 have installed the Zebra software and would like to use it,
 888 please answer 'yes' to the following question.  Otherwise,
 889 Koha will default to using its internal search engine.
 890 
 891 Please note that if you choose *NOT* to install Zebra,
 892 koha-conf.xml will still contain some references to Zebra
 893 settings.  Those references will be ignored by Koha.
 894 
 895 Install the Zebra configuration files?);
Comment 2 Mason James 2012-04-27 01:52:00 UTC
(In reply to comment #0)
> NoZebra has been deprecated since 3.4.0. It is time to remove the vestiges
> of NoZebra from the code and eliminate the syspref so that people stop
> thinking they can use it.

'stopwords' code and syspref needs to be removed too
Comment 3 Tomás Cohen Arazi 2012-07-25 14:13:17 UTC
Upgrade from NoZebra installs is broken, as there is code that uses the syspref, which should be completely removed from Koha.
Comment 4 Tomás Cohen Arazi 2013-03-14 17:34:29 UTC Comment hidden (obsolete)
Comment 5 Tomás Cohen Arazi 2013-03-14 18:09:12 UTC Comment hidden (obsolete)
Comment 6 Tomás Cohen Arazi 2013-03-14 18:16:48 UTC
To test:

- Apply the patch and do a fresh install
- Install procedure should "just work as usual"
- The nozebra table should not be created
- Searching for authorities should remain functional
- Add/Modify a biblio/authority record and nothing crashes
- Add an item and nothing crashes

Keep in mind that most of this patch is the removal of unused contitional if NoZebra blocks, templates showind NoZebra stuff and removal of the sysprefs in te relevant SQL files.
Comment 7 Tomás Cohen Arazi 2013-03-14 18:31:26 UTC Comment hidden (obsolete)
Comment 8 Julian Maurice 2013-03-18 13:08:17 UTC
Patch doesn't apply anymore on master (conflicts on C4/AuthoritiesMarc.pm and C4/Search.pm).
Comment 9 Tomás Cohen Arazi 2013-03-18 16:13:45 UTC Comment hidden (obsolete)
Comment 10 Tomás Cohen Arazi 2013-03-18 16:14:01 UTC Comment hidden (obsolete)
Comment 11 Julian Maurice 2013-03-19 09:39:07 UTC
I did a fresh install after applying the patches and can confirm that Koha is still working

- web installer OK
- nozebra table is not created OK
- add/modify/delete biblio/item/authority OK
- rebuild_zebra.pl OK
- search biblio/authority OK

so I will sign off these patches.

However, it still remains some references to NoZebra that could be removed:

C4/AuthoritiesMarc.pm:331:    if (C4::Context->preference('NoZebra')) {
C4/AuthoritiesMarc.pm:1416:    if (C4::Context->preference('NoZebra')) {
C4/AuthoritiesMarc.pm:1417:        #nozebra way    
C4/AuthoritiesMarc.pm:1419:        my $rq=$dbh->prepare(qq(SELECT biblionumbers from nozebra where indexname="an" and server="biblioserver" and value="$mergefrom" ));
C4/Search.pm:1260:    # no stemming/weight/fuzzy in NoZebra
C4/Search.pm:1261:    if ( C4::Context->preference("NoZebra") ) {
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt:5:<p style="color: #990000">Important: If NoZebra is set to 'Use' this option will not appear on the admin
Comment 12 Owen Leonard 2013-03-19 09:45:27 UTC
(In reply to comment #11)
> koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt

Shouldn't that template be removed by this patch?
Comment 13 Julian Maurice 2013-03-19 09:46:10 UTC Comment hidden (obsolete)
Comment 14 Julian Maurice 2013-03-19 09:46:23 UTC Comment hidden (obsolete)
Comment 15 Paul Poulain 2013-03-19 17:27:54 UTC
Created attachment 16437 [details] [review]
[PATCH] Bug 7440 - Remove NoZebra vestiges

Removed NoZebra vestiges. This comprises several code blocks that depend on the NoZebra syspref and NZ related functions/methods.

C4::Biblio->
 GetNoZebraIndexes
 _DelBiblioNoZebra
 _AddBiblioNoZebra

C4::Search->
 NZgetRecords
 NZanalyse
 NZoperatorAND
 NZoperatorOR
 NZoperatorNOT
 NZorder

C4::Installer->
 set_indexing_engine

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 16 Paul Poulain 2013-03-19 17:27:57 UTC
Created attachment 16438 [details] [review]
Bug 7440 - Remove NoZebra and QueryRemoveStopWords sysprefs

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 17 Paul Poulain 2013-03-19 17:27:59 UTC
Created attachment 16439 [details] [review]
Bug 7440 follow-up removing forgotten NoZebra references

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 18 Paul Poulain 2013-03-19 17:28:22 UTC
QA comments:

investigating, I've found some NoZebra references pending:

koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/stopwords.tt:<p style="color: #990000">Important: If NoZebra is set to 'Use' this option will not appear on the administration menu</p>
C4/Search.pm:    # no stemming/weight/fuzzy in NoZebra
C4/Search.pm:    if ( C4::Context->preference("NoZebra") ) {
C4/AuthoritiesMarc.pm:    if (C4::Context->preference('NoZebra')) {
C4/AuthoritiesMarc.pm:    if (C4::Context->preference('NoZebra')) {

I've attached a follow-up removing them as well.

I've tested as many pages as possible, and could not find anything going wrong

passes koha-qa

passed QA
Comment 19 Tomás Cohen Arazi 2013-03-19 17:38:12 UTC
(In reply to comment #18)
> QA comments:
> 
> investigating, I've found some NoZebra references pending:

There where some bits related to stopwords too, maybe those you find are related. I filled a bug for removing them, for which I haven't provided a bug as spent the time I had rebasing this one.
Comment 20 Paul Poulain 2013-03-19 17:44:06 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > QA comments:
> > 
> > investigating, I've found some NoZebra references pending:
> 
> There where some bits related to stopwords too, maybe those you find are
> related. I filled a bug for removing them, for which I haven't provided a
> bug as spent the time I had rebasing this one.

I don't think so, except for the stopword.tt line removed. Anyway, now there's no "NoZebra" references outside from old release notes, updatedatabase, so things are OK
Comment 21 Jared Camins-Esakov 2013-03-20 01:20:50 UTC
This patch has been pushed to master.