Koha/acqui
Fridolin Somers 78a692dee4 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>
2018-10-09 15:02:47 +00:00
..
pdfformat
acqui-home.pl Bug 19792: Performance boost for GetBudgetHierarchy 2018-05-11 10:52:46 -03:00
add_user_search.pl
addorder.pl Bug 19289: Use the ACQ framework to display bibliographic details 2018-04-11 16:45:20 -03:00
addorderiso2709.pl Bug 18639: Add replacementprice field to acquisitions workflow 2018-08-31 12:46:28 +00:00
ajax-getauthvaluedropbox.pl
basket.pl Bug 21033: Remove few warns in acqui/basket.pl 2018-08-09 11:31:44 +00:00
basketgroup.pl Bug 16739: Show note instead of 500 error for 'Generate EDIFACT' when no EDI account is configured 2018-09-28 19:24:49 +00:00
basketheader.pl
booksellers.pl
cancelorder.pl
check_budget_total.pl
check_uniqueness.pl
edi_ean.pl
edifactmsgs.pl Bug 20861: Correct EDI permissions on EDI messsages 2018-06-04 13:40:36 -04:00
edimsg.pl Bug 20861: Correct EDI permissions on EDI messsages 2018-06-04 13:40:36 -04:00
finishreceive.pl Bug 18639: (follow-up) Remove debugging code 2018-10-02 00:09:12 +00:00
histsearch.pl
invoice-files.pl
invoice.pl Bug 19166: (follow-up) Adjust table and files and QA issues 2018-07-19 17:28:41 +00:00
invoices.pl
lateorders-export.pl
lateorders.pl
modordernotes.pl
neworderbiblio.pl Bug 20151: always use current language for stemming 2018-10-09 15:02:47 +00:00
neworderempty.pl Bug 18639: Add replacementprice field to acquisitions workflow 2018-08-31 12:46:28 +00:00
newordersubscription.pl
newordersuggestion.pl
ordered.pl Bug 19271: Show vendor name on ordered/spent lists 2018-10-01 13:56:35 +00:00
orderreceive.pl Bug 18639: Add replacementprice field to acquisitions workflow 2018-08-31 12:46:28 +00:00
parcel.pl Bug 19812: Fix confusing holds count values in "Already received" table 2018-04-04 16:06:57 -03:00
parcels.pl
showorder.pl Bug 12395: (QA follow-up) Change wording for consistency and fix use CGI; 2018-07-06 14:01:50 +00:00
spent.pl Bug 19271: Show vendor name on ordered/spent lists 2018-10-01 13:56:35 +00:00
supplier.pl
transferorder.pl
uncertainprice.pl
updatesupplier.pl
z3950_search.pl Bug 19916: Add keyword and standard ID fields to acq external search 2018-03-28 16:03:37 -03:00