@@ -, +, @@ --- C4/Search.pm | 7 +++++++ 1 file changed, 7 insertions(+) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -1494,6 +1494,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; + ($query,$query_cgi,$query_desc,$previous_operand) = _build_initial_query({ query => $query, query_cgi => $query_cgi, --