]> git.koha-community.org Git - koha.git/commit
Bug 12430: Use releance ranking without QueryWeightFields
authorDavid Cook <dcook@prosentient.com.au>
Tue, 17 Jun 2014 06:59:32 +0000 (16:59 +1000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Tue, 15 Dec 2020 21:50:03 +0000 (21:50 +0000)
commit66b76dd33d623cc6165cab8a2a6c8f71f28834e3
tree004fea7bee68fe6093d79660125578d6405db0c0
parent3d40d7cf7fb5ddb37f9df949cbde2448e23c9883
Bug 12430: Use releance ranking without QueryWeightFields

The system preference "QueryWeightFields" is mutually exclusive with
the system preference "QueryAutoTruncate" and the * truncation
modifier, when not using QueryParser.

If you use truncation, relevance won't work anymore. (N.B. Relevance
doesn't work probably when using QueryParser, but for a very different
reason beyond the current scope of this bug.)

This patch adds relevance ranking when using truncation (or basically
when QueryWeightFields is disabled).

_TEST PLAN_

1) Turn on "QueryWeightFields" and set "QueryAutoTruncate" to auto
2) Turn off "UseQueryParser"
3) Do a keyword search in the OPAC
4) Note that the results are ordered by biblionumber ascending

5) Apply patch

6) Do the same keyword search in the OPAC
7) Note that the results are never ordered differently
(presumably in relevance order :P)

If you're a stickler, throw in some warns so that you can see
what CCL query is being sent to Zebra.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f6b5dfa4b718fb74654448b5663cb264b5c376b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 913cf92b2d8d4b1a948e32c941c903359afa7f02)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Search.pm