If you select an index in the search dropdown and then enter in a QP query starting with the field, Koha will prepend the index you do not want to use at the beginning of the search, resulting in a search that problem does not match what you were hoping for.
Created attachment 20123 [details] [review] Bug 10688: Don't prefix index inappropriately If you select an index in the search dropdown and then enter in a QP query starting with the field, Koha will prepend the index you do not want to use at the beginning of the search, resulting in a search that problem does not match what you were hoping for. To test: 1) Select an index in the search dropdown in the OPAC. Author is fine. 2) Enter a search term using manually entered indexes. For example: ti:cat in the hat 3) Note that the search fails. 4) Apply patch. 5) Repeat steps 1 and 2. 6) Note that the search succeeds. 7) Sign off.
Created attachment 20199 [details] [review] Bug 10688: Don't prefix index inappropriately If you select an index in the search dropdown and then enter in a QP query starting with the field, Koha will prepend the index you do not want to use at the beginning of the search, resulting in a search that problem does not match what you were hoping for. To test: 1) Select an index in the search dropdown in the OPAC. Author is fine. 2) Enter a search term using manually entered indexes. For example: ti:cat in the hat 3) Note that the search fails. 4) Apply patch. 5) Repeat steps 1 and 2. 6) Note that the search succeeds. 7) Sign off. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
I cannot reproduce the issue. I get the same results with and without the patch. Are there some prerequisites?
You need to have QueryParser set up, which means you have to turn on UseQueryParser and have query_parser in your koha-conf.xml: <queryparser_config>/home/jcamins/kohaclone/etc/searchengine/queryparser.yaml</queryparser_config>
(In reply to Jared Camins-Esakov from comment #4) > You need to have QueryParser set up, which means you have to turn on > UseQueryParser and have query_parser in your koha-conf.xml: > <queryparser_config>/home/jcamins/kohaclone/etc/searchengine/queryparser. > yaml</queryparser_config> Thanks, my koha-conf.xml did not contain the right path! Now I reproduce the issue and I confirm the patch fixes it. Marked as Passed QA.
Created attachment 20423 [details] [review] Bug 10688: Don't prefix index inappropriately If you select an index in the search dropdown and then enter in a QP query starting with the field, Koha will prepend the index you do not want to use at the beginning of the search, resulting in a search that problem does not match what you were hoping for. To test: 1) Select an index in the search dropdown in the OPAC. Author is fine. 2) Enter a search term using manually entered indexes. For example: ti:cat in the hat 3) Note that the search fails. 4) Apply patch. 5) Repeat steps 1 and 2. 6) Note that the search succeeds. 7) Sign off. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Jared!
Patch pushed to 3.14.x, will be in 3.14.2.
This patch has been pushed to 3.12.x, will be in 3.12.9. Thanks Jared!