Bug 22760 - catalogue search yields no results if queryparser is on
Summary: catalogue search yields no results if queryparser is on
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Mikaël Olangcay Brisebois
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-23 16:21 UTC by Mikaël Olangcay Brisebois
Modified: 2023-06-08 22:26 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on (886 bytes, patch)
2019-04-23 16:27 UTC, Mikaël Olangcay Brisebois
Details | Diff | Splinter Review
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on (930 bytes, patch)
2019-05-22 16:29 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on (975 bytes, patch)
2019-05-24 19:00 UTC, Bin Wen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mikaël Olangcay Brisebois 2019-04-23 16:21:55 UTC
If QueryParser is on and defaultsortorder is set to relevance,dsc, when you do a cataloging search, first page yields results but other pages don't return any results half the time. It also seems to break the sort by popularity, but that is not adressed by this patch.
Comment 1 Mikaël Olangcay Brisebois 2019-04-23 16:27:16 UTC
Created attachment 88536 [details] [review]
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on

Test plan: 
1. Set system preferences QueryParser to Try and set defaultsortorder/defaultsortfield to relevance,dsc.
2. Search the catalog with a keyword that will return more than 1 page of results.
3. Alternate between the page results a few times. 1/2 times, the page will return no results.
4. Apply patch.
5. Do steps 2-3 and verify that it works.
Comment 2 Margaret Hade 2019-05-22 14:01:15 UTC
Hello Mikaël,

Can you give me a little more context for this testing step: "Alternate between the page results a few times. 1/2 times, the page will return no results." Does this mean paginating through the results? Or clicking into results details, then back to results, then in to details and back again? 

Thanks, Margaret
Comment 3 Liz Rea 2019-05-22 16:29:43 UTC
Created attachment 89968 [details] [review]
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 4 Bin Wen 2019-05-24 19:00:35 UTC
Created attachment 90082 [details] [review]
Bug 22760: Correct parseQuery regex to match full words when QueryParser is on

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Comment 5 Bin Wen 2019-05-24 19:01:37 UTC
Test plan: 
1. Set system preferences QueryParser to Try and set defaultsortorder/defaultsortfield to relevance,dsc.
2. Search the catalog with a keyword that will return more than 1 page of results.
3. Go to page 2, page 1,page 2, page 1,Alternate between the page results a few times, the page will return no results.
4. Apply patch.
5. Do steps 2-3 and verify that it works.
Comment 6 Katrin Fischer 2019-05-28 05:51:49 UTC
I am sorry, but I can't replicate the problem with the test plan provided.

There are also some other smaller issues:
- Please include a description of the fix and the test plan in your commit message.
- Can you please provide a regression test to this change in Search.pm? It's quite a sensitive area.

... and also verify the problem still appears and make sure the test plan is correct. I set QueryParser to Try and searched for "de" in the sample database. I then switched back between page 1 and 2 using the navigation on top of the result list with the links labelled the same.
Comment 7 Liz Rea 2019-05-29 14:15:24 UTC
I was able to replicate this, as I've seen this error before. When I tested, I clicked through the numbered pages and each time with the original settings, unpatched, one of the pages would end up with "no results found." The behaviour did not appear with the patch installed.

You're right about the unit test though. :)
Comment 8 David Cook 2022-10-17 03:29:37 UTC
QueryParser doesn't exist anymore so this should be invalid