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.
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.
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
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>
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>
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.
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.
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. :)
QueryParser doesn't exist anymore so this should be invalid