[Koha-bugs] [Bug 12430] Search truncation disables relevance ranking
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Dec 3 06:08:15 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12430
David Cook <dcook at prosentient.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #99141|0 |1
is obsolete| |
--- Comment #64 from David Cook <dcook at prosentient.com.au> ---
Created attachment 114129
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114129&action=edit
Bug 12430: Force relevance ranking when not using QueryParser
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_
0) Use koha-testing-docker
1) Ensure that "QueryWeightFields" is enabled and "QueryAutoTruncate" is set to
auto
2) Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?q=e
3) Note that the results are ordered by biblionumber ascending
4) Apply patch
5) Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?q=e
6) Note that the results are not ordered by biblionumber ascending
(presumably they are in relevance order)
If you edit /etc/koha/sites/kohadev/koha-conf.xml and add "requests"
to the end of "zebra_loglevels", uncomment that option, and carefully
restart Zebra, you should be able to see the following in
/var/log/koha/kohadev/zebra-output.log:
Search biblios OK 394 1 1+0 RPN @attrset Bib-1 @attr 1=1016 @attr 4=6 @attr 5=1
@attr 2=102 e
The 2=102 indicates a relevance search.
Signed-off-by: Victor Grousset/tuxayo <victor at tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list