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)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 17 Dec 2013 16:36:26 +0000 (16:36 +0000)
commit868855df4b674b495966c022392068c2fdd3a35f
tree77e172a23d09cdfaf8f7d68a48841d330b17fa4b
parent437f06624759c464d667107d9f73ec05283f6892
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>
C4/Search.pm