Go to file
Fridolin Somers 6830a61918 Bug 20151: always use current language for stemming
When stemming is enabled, in catalog searching "C4::Search::_build_stemmed_operand" will transform query operand into stemmed operand using stemmer Lingua::Stem::Snowball with a specified language.
This stemmer returns undef stemmed operand if no language is defined.

In main catalog search (catalogue/search.pl) current language is used.
But in other pages "acqui/neworderbiblio.pl" and "cataloguing/addbooks.pl" no language is defined so stemmed operand is empty and so stemming is not applied.

This patch corrects by returning in "C4::Search::_build_stemmed_operand" operand without change if no langage is defined.
And uses current langage in pages "acqui/neworderbiblio.pl" and "cataloguing/addbooks.pl" so all catalog search uses stemming.

Test plan :
1) Enable system preferences QueryStemming and QueryWeightFields
2) Disable system preferences QueryAutoTruncate, QueryFuzzy and UseQueryParser
3) Go to intranet main page and click on "Search the catalog" tab
4) Perform a search (without index) that uses the stemming, for example searching for "years" will also match "year"
5) Note how many results you get, for example "year" gets 24 results and "years" gets 24 results
6) Go to "Cataloging" module
7) Perform a search on same word in "Cataloging search" tab
8) Note how many results you get
9) Without patch you get fewer results than first search (step 5) because stemming is not applied, for example "year" gets 11 results and "years" gets 15 results
10) With patch you get the same results as first search (step 5) because stemming is applied, for example "year" and "years" gets 24 results
11) Same tests in aquisition module
12) On a basket, click "Add to basket" and perform a search in "From an existing record"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 78a692dee4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2170698ab9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-10-15 16:55:49 +02:00
C4 Bug 20151: always use current language for stemming 2018-10-15 16:55:49 +02:00
Koha Bug 21425: Display basketno correctly in Order error msg 2018-10-11 14:59:37 +02:00
OpenILS
…
acqui Bug 20151: always use current language for stemming 2018-10-15 16:55:49 +02:00
admin Bug 20504: Fix lang attribute in html tag on systempreferences page 2018-09-21 15:36:01 +02:00
api/v1 Bug 7317: (QA followup) Make query parameters consistent with other endpoints 2017-11-09 11:42:16 -03:00
authorities Bug 19583: Remove use of C4::AuthoritiesMarc 2018-05-14 13:19:48 +00:00
basket Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
catalogue Bug 21248: Fix COinS carp in MARC details page on unknown record 2018-09-24 11:41:37 +02:00
cataloguing Bug 20151: always use current language for stemming 2018-10-15 16:55:49 +02:00
circ Bug 21168: Handle deleted checked-in items on checking in 2018-09-24 09:04:24 +02:00
clubs Bug 18632: Remove 'CGI::param called in list context' warnings 2017-05-28 22:25:22 -04:00
course_reserves Bug 19230: Preventing warn when deleting course 2018-02-02 15:01:33 +00:00
debian Bug 21416: 'gr' option missing from ZEBRA_LANGUAGE options in koha-sites.conf 2018-10-11 14:36:28 +02:00
docs Bug 20906: Prevent test failures due to stricter perl 2018-06-28 07:44:23 +02:00
errors
…
etc Bug 21031: Apache Rewrite rules don't work for API when using anything but Debian package Plack configuration 2018-09-21 11:57:55 +02:00
ill Bug 21289: Fix "isa" bug during partner request 2018-10-11 14:45:14 +02:00
installer Bug 16690: Simplify SHOW GRANTS to work when connected 2018-10-11 14:38:14 +02:00
koha-tmpl Bug 21176: Fix due date calculation when high holds and TimeFormat is 12hr 2018-10-11 15:17:45 +02:00
labels Bug 20765: Fix search for items by acqdate in label batch 2018-09-24 11:52:13 +02:00
members Bug 21397: Mark "Routing list" tab as active when selected 2018-10-08 07:57:03 +02:00
misc Bug 21322: process_message_queue.pl --type should take an argument 2018-10-11 15:49:57 +02:00
offline_circ Bug 13779: (QA follow-up) Correct checkauth call in offline_circ/download.pl 2018-09-24 11:39:46 +02:00
opac Bug 20023: (QA follow-up) Tiny simplification 2018-10-03 15:12:22 +02:00
patron_lists Bug 16154: CGI->multi_param - Force scalar context 2016-04-26 23:16:43 +00:00
patroncards Bug 8604: Patron cards made for patrons which don't have patron images use preceding card's image 2018-08-28 15:13:11 +02:00
plugins Bug 19088: plugins-upload causes error log noise 2017-08-30 15:05:56 -03:00
reports Bug 16653: (QA follow-up) Avoid a warning and remove unused variables 2018-07-04 09:00:47 +02:00
reserve Bug 20724: Move the ReservesNeedReturns logic to AddReserve 2018-08-27 14:45:26 +02:00
reviews Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl 2017-12-21 16:07:12 +00:00
rotating_collections Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
serials Bug 20241: Fix display of publication year in subscription record search for MARC21 2018-10-10 12:07:06 +02:00
services
…
skel
…
suggestion Bug 21048: (QA follow-up) Fix authorized value statuses in filter 2018-09-21 12:14:19 +02:00
svc Bug 20760: Fill authorised values in svc framework 2018-06-18 08:01:48 +02:00
t Bug 15971: Add biblioitems to available fields for serial claim notices and fix notices editor display 2018-10-11 15:11:08 +02:00
tags Bug 19040: Refactor GetMarcBiblio parameters 2017-08-25 10:23:42 -03:00
test
…
tmp/modified_authorities
…
tools Bug 15971: Add biblioitems to available fields for serial claim notices and fix notices editor display 2018-10-11 15:11:08 +02:00
virtualshelves Bug 17214: Add records to lists by biblionumber 2017-10-27 14:10:26 -03:00
xt Bug 20906: Fix translatable-templates.t 2018-06-28 07:44:34 +02:00
.editorconfig
…
.htaccess
…
.mailmap Update mailmap - Jonathan Druart 2017-06-21 12:42:19 -03:00
INSTALL Bug 17626: Remove existing install instructions and link to the wiki pages instead 2016-11-22 11:29:07 +00:00
Koha.pm Bug 5458: DBRev 17.11.10.001 2018-10-03 15:20:56 +02:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 7317: Interlibrary loans framework for Koha. 2017-11-09 11:42:12 -03:00
README
…
README.md Bug 15465: Fix typo in bugs.k-c.org 2017-05-26 11:45:31 -03:00
README.robots
…
about.pl Bug 7317: Add partner_code checks to abot page 2017-11-09 11:42:14 -03:00
changelanguage.pl Bug 16776: Do not forget external language choice in language switcher 2016-08-10 13:51:33 +00:00
edithelp.pl Bug 16447: Remove occurrence of the borrow permission which does no longer exist 2016-05-05 21:28:14 +00:00
fix-perl-path.PL
…
help.pl Bug 16724: Fix link to the online documentation links 2016-06-24 12:00:42 +00:00
install-CPAN.pl
…
koha_perl_deps.pl Bug 17990: Refactor Perl module versions check 2017-02-17 12:13:44 +00:00
kohaversion.pl
…
mainpage.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
rewrite-config.PL Bug 15427 : Enable TLS support for MySQL 2017-03-03 18:33:07 +00:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo