Fridolin Somers
78a692dee4
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> |
||
---|---|---|
.. | ||
pdfformat | ||
acqui-home.pl | ||
add_user_search.pl | ||
addorder.pl | ||
addorderiso2709.pl | ||
ajax-getauthvaluedropbox.pl | ||
basket.pl | ||
basketgroup.pl | ||
basketheader.pl | ||
booksellers.pl | ||
cancelorder.pl | ||
check_budget_total.pl | ||
check_uniqueness.pl | ||
edi_ean.pl | ||
edifactmsgs.pl | ||
edimsg.pl | ||
finishreceive.pl | ||
histsearch.pl | ||
invoice-files.pl | ||
invoice.pl | ||
invoices.pl | ||
lateorders-export.pl | ||
lateorders.pl | ||
modordernotes.pl | ||
neworderbiblio.pl | ||
neworderempty.pl | ||
newordersubscription.pl | ||
newordersuggestion.pl | ||
ordered.pl | ||
orderreceive.pl | ||
parcel.pl | ||
parcels.pl | ||
showorder.pl | ||
spent.pl | ||
supplier.pl | ||
transferorder.pl | ||
uncertainprice.pl | ||
updatesupplier.pl | ||
z3950_search.pl |