Main Koha release repository https://koha-community.org
Find a file
Fridolyn SOMERS 39bf1c502a Bug 9588: weighted search query with index
When QueryWeightFields is enabled, the searching query is created with several options.
In C4::Search::_build_weighted_query, when no index is defined, the query is build with fuzzy and stemming options. When an index is defined, theses options are missing, only unconditional right truncation is used.
The consequence is that when QueryStemming is disabled, a search with index can give more results (due to right truncation) that a search without.

This patch adds stemming and fuzzy on search with index, conditioned with QueryFuzzy and QuerryStemming sysprefs.
Also changes world list search (wrld) weight to r6 in order to set fuzzy search to r8 and stemming search to r9 (like search without index).

Test plan :
- Go to searching preferences (admin/preferences.pl?tab=searching)
- Set QueryAutoTruncate to "only if * is added"
- Set QueryFuzzy and QuerryStemming to "Don't try"
- Set QueryWeightFields to "Enable"
- Go to advanced search page
- Select an indexe (ie Title) and perform a search on a short word
=> Look at zebrarv log and see that query does not contain right truncation : @attr 5=1
- Set QueryFuzzy to "Try"
- Perform same search
=> Look at zebrarv log and see that query contains fuzzy : @attr 5=103
- Set QueryFuzzy to "Don't try" and QuerryStemming to "Try"
- Perform same search
=> Look at zebrarv log and see that query contains rigth truncation on stemmed word : @attr 5=1

Signed-off-by: koha.aixmarseille <koha.aixmarseille@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch makes Fuzzy and Stemming influence search results on weighted
queries when using an index. Side-effect is however that the results for a
search like index=term* (add truncation manually too) could be LOWER than the
the number of hits for index=term. Further comments on Bugzilla.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-04-21 20:54:21 -04:00
acqui Bug 9986: Two fixes for Z3950 search 2013-04-15 08:44:11 -04:00
admin Bug 6554: Followup for preferences.pl 2013-04-01 18:51:50 -04:00
authorities Bug 6554 - make Koha internally utf-8 clean 2013-04-01 18:51:49 -04:00
basket
C4 Bug 9588: weighted search query with index 2013-04-21 20:54:21 -04:00
catalogue Bug 6554 - make Koha internally utf-8 clean 2013-04-01 18:51:49 -04:00
cataloguing Bug 9986: Two fixes for Z3950 search 2013-04-15 08:44:11 -04:00
circ Bug 9984: Remove server-side sort on the hold ratios table 2013-04-21 20:44:01 -04:00
debian Bug 10042 - Minor typo ("Communnity") in packages docs 2013-04-18 08:36:11 -04:00
docs Add Barry Cannon to the history file 2013-04-21 09:43:16 -04:00
errors
etc Bug 9812 - Forbid access to several files through the browser 2013-04-07 13:43:05 -04:00
install_misc Bug 9914: dependency updates for 3.12 2013-03-23 10:46:07 -04:00
installer Bug 10074: QA Followup for InstallAuth.pm 2013-04-19 23:07:01 -04:00
Koha Bug 9971 - Plugins system is broken! 2013-04-03 06:02:09 -04:00
koha-tmpl Bug 9984: Remove server-side sort on the hold ratios table 2013-04-21 20:44:01 -04:00
labels Bug 8943 - Add table sorting to labels - Followup - Sort pulldowns in batch export. 2013-03-31 08:33:42 -04:00
members Bug 6554 - make Koha internally utf-8 clean 2013-04-01 18:51:49 -04:00
misc Bug 8745: General whitespace and tab tidy 2013-04-21 09:41:34 -04:00
offline_circ Bug 8220 - Allow koc uploads to go to process queue instead of being applied directly. 2013-03-21 20:35:37 -04:00
opac Bug 10058 - Fix unapi for NORMARC 2013-04-19 22:57:32 -04:00
OpenILS Bug 9239 QA follow-up: remove stray debug code 2013-03-16 21:32:34 -04:00
patroncards Bug 9951: Followup for Tools 2013-04-19 23:25:48 -04:00
plugins Bug 7804 - Add Koha Plugin System - QA Followup 2 2013-03-20 14:50:19 -04:00
reports Bug 6554 - make Koha internally utf-8 clean 2013-04-01 18:51:49 -04:00
reserve Bug 6554 - make Koha internally utf-8 clean 2013-04-01 18:51:49 -04:00
reviews
rotating_collections Bug 9605: rotating collections permissions are wrong 2013-03-30 22:11:05 -04:00
selenium
serials Bug 6554: Followup for serial search 2013-04-01 18:51:50 -04:00
services
skel Bug 7804 - Add Koha Plugin System 2013-03-20 14:49:47 -04:00
sms
suggestion Bug 9226: Wrong branch filter after suggestion creation 2013-02-15 08:34:11 -05:00
svc Bug 9908 - Fixing OCLC Connexion Client 2013-03-29 21:29:10 -04:00
t Bug 9937: Add new unit tests for new routines (introduced by bug 5343) 2013-03-30 17:05:15 -04:00
tags Bug 9951: Followup for Tools 2013-04-19 23:25:48 -04:00
test
tmp/modified_authorities
tools Bug 9951: Followup for tools/viewlog.pl 2013-04-19 23:25:48 -04:00
virtualshelves
xt Bug 9802 - add test case to ensure man pages have correct XML 2013-03-20 15:11:10 -04:00
.htaccess
.mailmap
about.pl Bug 7440 - Remove NoZebra vestiges 2013-03-19 21:17:04 -04:00
changelanguage.pl
edithelp.pl 7368 Typo in edithelp.pl warning 2013-04-18 09:47:58 -04:00
fix-perl-path.PL installer: improvements to fix-path-perl.PL on Win32 2007-12-20 19:20:12 -06:00
help.pl Bug 8949: Trying to view help on a page without any help results in a nasty error 2012-11-05 08:39:23 -05:00
INSTALL Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
install-CPAN.pl
INSTALL.debian
INSTALL.fedora7 Bug 7440 - Remove NoZebra vestiges 2013-03-19 21:17:04 -04:00
INSTALL.opensuse Bug 7759, update of install files to use background indexing (and some whitespace tidy) 2012-04-20 16:11:52 +02:00
INSTALL.ubuntu
INSTALL.ubuntu.12.04 Bug 9267 - Ubuntu 12.04 install docs broken 2013-03-07 09:46:55 -05:00
INSTALL.ubuntu.lucid
koha_perl_deps.pl
kohaversion.pl Bug 9381: Increment version number 2013-04-07 13:48:46 -04:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Revert "Bug 7167: New version for updatedatabase" 2012-12-27 14:02:56 -05:00
Makefile.PL Bug 9890 - Fix the new plugin system for package installs 2013-03-22 16:54:04 -04:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.robots
rewrite-config.PL Bug 7804 - Add Koha Plugin System 2013-03-20 14:49:47 -04:00

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/