@@ -, +, @@ using QueryParser --- C4/Search.pm | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -1486,6 +1486,13 @@ sub buildQuery { warn "FIELD WEIGHTED OPERAND: >$weighted_operand<" if $DEBUG; + #Use relevance ranking when not using a weighted query (which adds relevance ranking of its own) + + #N.B. Truncation is mutually exclusive with Weighted Queries, + #so even if QueryWeightFields is turned on, QueryAutoTruncate will turn it off, thus + #the need for this relevance wrapper. + $operand = "(rk=($operand))" unless $weight_fields; + # If there's a previous operand, we need to add an operator if ($previous_operand) { --