[Koha-bugs] [Bug 13414] Enable right truncation with search by relevance
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jan 6 23:45:26 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13414
--- Comment #7 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 34316
--> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34316
Bug 13414 - Enable automatic right truncation while searching by relevance
Review of attachment 34316:
--> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=13414&attachment=34316)
-----------------------------------------------------------------
::: C4/Search.pm
@@ +1030,5 @@
> #$weighted_query .=" or kw,wrdl,r5=\"$operand\""; # word list any
> $weighted_query .= " or wrdl,fuzzy,r8=\"$operand\""
> if $fuzzy_enabled; # add fuzzy, word list
> + if ( $stemming and $stemmed_operand ) {
> + $weighted_query .= " or wrdl,right-Truncation,r9=\"$stemmed_operand\""
No functional difference... would be better to have this in a separate patch.
@@ +1620,4 @@
> # Apply Truncation
> if (
> scalar(@$righttruncated) + scalar(@$lefttruncated) +
> + scalar(@$rightlefttruncated) > 0 and $weight_fields < 2 )
This will disable all truncation except for right truncation (which will be
forced), if "QueryWeightFields" is set to 2.
I don't love this, but seeing as truncation currently disables
"QueryWeightFields", it might be fine.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list