]> git.koha-community.org Git - koha.git/commit
Bug 7518: certain searches with quotation marks don't work
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Thu, 7 Mar 2013 15:02:55 +0000 (16:02 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 7 Feb 2014 15:09:51 +0000 (12:09 -0300)
commit87079a0aa149b67b064bfdbb8eb603fa60a260fb
tree227068b833cd428781b43d14c0401cdb79c07b3f
parente3bf3e4521fa09a0d5dddcbb083282ec9c8e04b8
Bug 7518: certain searches with quotation marks don't work

Under certain circumstance, a search term without quotation marks
returns the expected results while the same search with a
double quote embedded in it would fail.

Koha should ignore the quotation marks and return results anyway.

This appears when  QueryWeightFields syspref is activated (and
QueryAutoTruncate is off), as field weighting builds a complex CCL
query using double quotes around search words.  This patch simply
replaces double quotes in search words by a space.

Test plan :
- Set QueryAutoTruncate off (you may also need to set QueryFuzzy to off)
- Set QueryWeightFields off
- Perform a serch on two words where you have results, like : centre "ville
=> you get results
- Set QueryWeightFields on
- Perform same serch
=> you get the same results

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 868855df4b674b495966c022392068c2fdd3a35f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f1bb46172bdc90db00a08c2c78e169952fd22feb)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Search.pm