I did some tests while working on bug 7518 and found that truncation seems not to work correctly when QueryParser is activated: START CONFIGURATION: Chr UseQueryParser Try QueryAutoTruncate only if * is added QueryFuzzy Try QueryStemming Try QueryWeightFields Enable TESTS: 1) NOT OK Keyword Geschichte 1236 Keyword Gesch* No results found! Keyword Gesch No results found! 2) OK UseQueryParser Do not try Keyword Geschichte 1236 Keyword Gesch* 1372 Keyword Gesch 1379 3) NOT OK UseQueryParser Try QueryAutoTruncate automatically Keyword Geschichte 1236 Keyword Gesch* No results found! Keyword Gesch No results found!
Created attachment 17904 [details] [review] Bug 9961: Add truncation support to QP driver The original implementation of QueryParser did not handle truncation based on the QueryAutoTruncate system preference. This patch adds support. To test: 1) Apply patch. 2) Turn on UseQueryParser. 3) Set QueryAutoTruncate to "automatically." 4) Search for "har". Note that it returns results with words like "Harry" (i.e. with right truncation). 5) Search for "har*". Note that it still returns results with right truncation. 6) Set QueryAutoTruncate to "only when * is added." 7) Search for "har". Note that it returns only records that have the exact word "har" in them (most likely there will be none unless you have Hebrew items). 8) Search for "har*". Note that once again it returns results for "Harry" (i.e. right truncated results). 9) Sign off. This patch also reindents a hash in Koha/QueryParser/Driver/PQF.pm because it was hard to read before.
Created attachment 17935 [details] [review] Bug 9961: Add truncation support to QP driver The original implementation of QueryParser did not handle truncation based on the QueryAutoTruncate system preference. This patch adds support. To test: 1) Apply patch. 2) Turn on UseQueryParser. 3) Set QueryAutoTruncate to "automatically." 4) Search for "har". Note that it returns results with words like "Harry" (i.e. with right truncation). 5) Search for "har*". Note that it still returns results with right truncation. 6) Set QueryAutoTruncate to "only when * is added." 7) Search for "har". Note that it returns only records that have the exact word "har" in them (most likely there will be none unless you have Hebrew items). 8) Search for "har*". Note that once again it returns results for "Harry" (i.e. right truncated results). 9) Sign off. This patch also reindents a hash in Koha/QueryParser/Driver/PQF.pm because it was hard to read before.
Created attachment 17976 [details] [review] Bug 9961: Add truncation support to QP driver The original implementation of QueryParser did not handle truncation based on the QueryAutoTruncate system preference. This patch adds support. To test: 1) Apply patch. 2) Turn on UseQueryParser. 3) Set QueryAutoTruncate to "automatically." 4) Search for "har". Note that it returns results with words like "Harry" (i.e. with right truncation). 5) Search for "har*". Note that it still returns results with right truncation. 6) Set QueryAutoTruncate to "only when * is added." 7) Search for "har". Note that it returns only records that have the exact word "har" in them (most likely there will be none unless you have Hebrew items). 8) Search for "har*". Note that once again it returns results for "Harry" (i.e. right truncated results). 9) Sign off. This patch also reindents a hash in Koha/QueryParser/Driver/PQF.pm because it was hard to read before. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Created attachment 18010 [details] [review] [PASSED QA] Bug 9961: Add truncation support to QP driver The original implementation of QueryParser did not handle truncation based on the QueryAutoTruncate system preference. This patch adds support. To test: 1) Apply patch. 2) Turn on UseQueryParser. 3) Set QueryAutoTruncate to "automatically." 4) Search for "har". Note that it returns results with words like "Harry" (i.e. with right truncation). 5) Search for "har*". Note that it still returns results with right truncation. 6) Set QueryAutoTruncate to "only when * is added." 7) Search for "har". Note that it returns only records that have the exact word "har" in them (most likely there will be none unless you have Hebrew items). 8) Search for "har*". Note that once again it returns results for "Harry" (i.e. right truncated results). 9) Sign off. This patch also reindents a hash in Koha/QueryParser/Driver/PQF.pm because it was hard to read before. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Thx for fixing this Jared!
This patch has been pushed to master and 3.12.x.
Not needed for 3.10.x bug fix for new feature on 3.12.x
Created attachment 29866 [details] [review] Fix the ProhibitedSubroutinePrototypes QA critical error by removing the ($) from the GetMandatoryFieldZ3950 function
Comment on attachment 29866 [details] [review] Fix the ProhibitedSubroutinePrototypes QA critical error by removing the ($) from the GetMandatoryFieldZ3950 function Wrong bug number with git bz :(