Created attachment 68942 [details] [review] Bug 19580: Unit tests
Created attachment 68943 [details] [review] Bug 19580: Exclude period as splitting character for autotrunction To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number.raw:"4"' (or a vlid biblionumber) 7 - should get expected result
I think you need to escape that hyphen unless its the last character within the character class brackets (like this: my @tokens = split /((?:[\w\-.]+:)?"[^"]+"|\s+)/, $query;)
Tried making this change myself but got "'fatal: sha1 information is lacking or useless“ when apply a patch" when running git bz apply. Perhaps best to wait until https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19559 has been commited and then reroll this patch on master.
Created attachment 69094 [details] [review] Bug 19580: Unit tests Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Created attachment 69095 [details] [review] Bug 19580: Exclude period as splitting character for autotrunction To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number.raw:"4"' (or a vlid biblionumber) 7 - should get expected result Signed-off-by: David Bourgault <david.bourgault@inlibro.com>
Tests passed Works as described QA tools threw errors, as David Gustafsson said. I corrected and amend the patch accordingly. QA tools passed green
Looks good! Have also tested the patch and everything works as expected.
Created attachment 70455 [details] [review] Bug 19580: Unit tests Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 70456 [details] [review] Bug 19580: Exclude period as splitting character for autotrunction To test: 0 - Apply Unit test patch only 1 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 2 - Should fail 3 - Apply this patch 4 - prove t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t 5 - should pass 6 - search for 'Local-number.raw:"4"' (or a vlid biblionumber) 7 - should get expected result Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me. Not tested with ES. No harm expected.
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Pushed to Stable for 17.11.02
Pushed to 17.05.x for v17.05.09