https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20151
--- Comment #1 from Fridolin SOMERS <[email protected]> --- Created attachment 71285 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71285&action=edit Bug 20151: always use current language for stemming When stemming is enable in catalog searching, C4::Search::_build_stemmed_operand will transform operand into stemmed operand using stemmer Lingua::Stem::Snowball with a specified language. This stemmer returns undef is no language is defined. In classic catalog search, current language is used. But in other pages acqui/neworderbiblio.pl and cataloguing/addbooks.pl no language is defined so operand is empty. Any search returns entire catalog. This patch corrects by returning operand without change if no langage is defined in C4::Search::_build_stemmed_operand. And uses current langage in pages acqui/neworderbiblio.pl and cataloguing/addbooks.pl. Test plan : 1) Enable system preferences QueryStemming and QueryWeightFields 2) Disable system preferences QueryAutoTruncate, QueryFuzzy and UseQueryParser 3) Perform an search in catalog (without index) that uses the stemming, for example "historical" will search "histor*" 4) Go to "Cataloging" 5) Perform a search on same word in "Cataloging search" 6) Without patch you have entire catalog, with patch you have correct number of results 7) Go to aquisition on a basket and click "Add to basket" 8) Perform search in "From an existing record" 9) Without patch you have entire catalog, with patch you have correct number of results -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
