[Bug 12738] New: Search behaviour inconsistent with QueryParser on Perl 5.18
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Bug ID: 12738 Summary: Search behaviour inconsistent with QueryParser on Perl 5.18 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org To reproduce: - Make sure you're running on a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS) - Have UseQueryParser == "Don't try" - Perform a search typing just a word that would have many matches on your Zebra db. - Take note of the search results count. - Make sure you have the queryparser.yaml file in your config dir. - Set UseQueryParser == "Try" - Perform the same search a couple of times => FAIL: Notice that the search results count differs from one run to the other. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=10542 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com, | |jcamins@cpbibliography.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 30630 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30630&action=edit Bug 12738: (regression tests) C4::Context should set keyword search as default for QueryParser This patch introduces tests for the QueryParser PQF driver usage in Koha. Specifically its initialization on C4::Context, and initial setup. It also introduces a .pl script that is used to load C4::Context with different hash randomization seeds on purpose, to verify the initialization result is deterministic and consistent between runs. To test: $ prove -v t/db_dependent/QueryParser.t It should fail because different default_search_class is set on each run, and it is not often the one we expect. Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 30631 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30631&action=edit Bug 12738: C4::Context should set 'keyword' as the default search class On a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS): To reproduce: - Have UseQueryParser == "Don't try" - Perform a search typing just a word that would have many matches on your Zebra db. - Take note of the search results count. - Make sure you have the queryparser.yaml file in your config dir. - Set UseQueryParser == "Try" - Perform the same search a couple of times => FAIL: Notice that the search results count differs from one run to the other. - Run the regression tests $ prove -v t/db_dependent/QueryParser.t => FAIL: tests fail To test: - Apply the patch - Run tests $ prove -v t/db_dependent/QueryParser.t => SUCCESS: tests pass - Repeat the steps 'To reproduce' => SUCCESS: Search results count is deterministic :-D - Sign off :-D Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30630|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 30633 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30633&action=edit [SIGNED OFF] Bug 12738: (regression tests) C4::Context should set keyword search as default for QueryParser This patch introduces tests for the QueryParser PQF driver usage in Koha. Specifically its initialization on C4::Context, and initial setup. It also introduces a .pl script that is used to load C4::Context with different hash randomization seeds on purpose, to verify the initialization result is deterministic and consistent between runs. To test: $ prove -v t/db_dependent/QueryParser.t It should fail because different default_search_class is set on each run, and it is not often the one we expect. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30631|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 30634 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30634&action=edit [SIGNED OFF] Bug 12738: C4::Context should set 'keyword' as the default search class On a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS): To reproduce: - Have UseQueryParser == "Don't try" - Perform a search typing just a word that would have many matches on your Zebra db. - Take note of the search results count. - Make sure you have the queryparser.yaml file in your config dir. - Set UseQueryParser == "Try" - Perform the same search a couple of times => FAIL: Notice that the search results count differs from one run to the other. - Run the regression tests $ prove -v t/db_dependent/QueryParser.t => FAIL: tests fail To test: - Apply the patch - Run tests $ prove -v t/db_dependent/QueryParser.t => SUCCESS: tests pass - Repeat the steps 'To reproduce' => SUCCESS: Search results count is deterministic :-D - Sign off :-D Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Here's one I made earlier.. Luck would have it I'de just set up a pair of servers to test this exact bug when this report and patch appeared :) (I was doing this to verify a hunch related to QA on bug 10542). Happy to sign off, this patch fixes the bug and the test works as expected (fails on perl 5.18 pre the patch, passes post the patch). The test also passes on pre perl 5.18 regardless of the patch, which is also correct, as the bug only affects post 5.18 perl. I've also tested with and without the patch on a pre 5.18 environment for good measure.. all still works as expected. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |gmcharlt@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12742 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30633|0 |1 is obsolete| | Attachment #30634|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30658 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30658&action=edit [PASSED QA] Bug 12738: (regression tests) C4::Context should set keyword search as default for QueryParser This patch introduces tests for the QueryParser PQF driver usage in Koha. Specifically its initialization on C4::Context, and initial setup. It also introduces a .pl script that is used to load C4::Context with different hash randomization seeds on purpose, to verify the initialization result is deterministic and consistent between runs. To test: $ prove -v t/db_dependent/QueryParser.t It should fail because different default_search_class is set on each run, and it is not often the one we expect. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30659 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30659&action=edit [PASSED QA] Bug 12738: C4::Context should set 'keyword' as the default search class On a Perl 5.18 environment (e.g. Ubuntu 14.04 LTS): To reproduce: - Have UseQueryParser == "Don't try" - Perform a search typing just a word that would have many matches on your Zebra db. - Take note of the search results count. - Make sure you have the queryparser.yaml file in your config dir. - Set UseQueryParser == "Try" - Perform the same search a couple of times => FAIL: Notice that the search results count differs from one run to the other. - Run the regression tests $ prove -v t/db_dependent/QueryParser.t => FAIL: tests fail To test: - Apply the patch - Run tests $ prove -v t/db_dependent/QueryParser.t => SUCCESS: tests pass - Repeat the steps 'To reproduce' => SUCCESS: Search results count is deterministic :-D - Sign off :-D Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Now search with QueryParser always returns the correct number of results on a system with the newer Perl version. Passes all tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- That was an evil bug - glad to see it fixed :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org