Summary: | Truncation and QueryAutoTruncate not working properly with new QueryParser | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Searching | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P5 - low | CC: | chris, eric.begin, jcamins, mathsabypro, mirko |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 9961: Add truncation support to QP driver
Bug 9961: Add truncation support to QP driver Bug 9961: Add truncation support to QP driver [PASSED QA] Bug 9961: Add truncation support to QP driver Fix the ProhibitedSubroutinePrototypes QA critical error by removing the ($) from the GetMandatoryFieldZ3950 function |
Description
Katrin Fischer
2013-03-31 20:24:50 UTC
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 :( |