Bug 11533

Summary: "use" QueryParser breaks authority search
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers
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:
Attachments: Bug 11533: (regression test) QP breaks authority search
Bug 11533: (regression test) QP breaks authority search
Bug 11533: fix authority searching with no sorting when QueryParser is enabled
Bug 11533: fix authority searching with no sorting when QueryParser is enabled
Bug 11533: (regression test) QP breaks authority search
Bug 11533: fix authority searching with no sorting when QueryParser is enabled

Description Tomás Cohen Arazi 2014-01-13 19:20:33 UTC
To reproduce:
- Set a dev install (i did it using DOM) and launch zebrasrv.
- Verify that ~/koha-dev/koha-conf.xml points to an existent file in the 'queryparser_config' section.
- Initialize the DB with the default data add a few authority records and reindex.
- Search for the authority records (More > Authorities)
=> The results are there
- Enable QP (sysprefs > "use" QueryParser
- Do the same search
=> No results
Comment 1 Tomás Cohen Arazi 2014-01-13 19:30:16 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2014-01-16 20:39:52 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2014-01-16 20:39:57 UTC Comment hidden (obsolete)
Comment 4 Galen Charlton 2014-01-16 20:41:45 UTC
(In reply to Tomás Cohen Arazi from comment #0)
> To reproduce:
> - Set a dev install (i did it using DOM) and launch zebrasrv.
> - Verify that ~/koha-dev/koha-conf.xml points to an existent file in the
> 'queryparser_config' section.
> - Initialize the DB with the default data add a few authority records and
> reindex.
> - Search for the authority records (More > Authorities)
> => The results are there
> - Enable QP (sysprefs > "use" QueryParser
> - Do the same search
> => No results

For folks attempting to reproduce the bug -- without the patches, it breaks for me only with the sort order is set to 'None'.
Comment 5 Tomás Cohen Arazi 2014-01-22 15:31:14 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2014-01-24 13:41:40 UTC
Created attachment 24682 [details] [review]
Bug 11533: (regression test) QP breaks authority search

This patch duplicates the SearchAuthority tests, with QP enabled.
Searching shouldn't be affected by QP. Instructions for manually
reproducing this can be read in the first comment for the bug entry.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Kyle M Hall 2014-01-24 13:41:53 UTC
Created attachment 24683 [details] [review]
Bug 11533: fix authority searching with no sorting when QueryParser is enabled

This patch fixes an issue where chosing 'None' as the sort order
for an authority search would result in zero hits if QueryParser is
eanbled.

This patch also adds some additional test cases.

To test:

[1] Enable QueryParser.
[2] Perform an authority search in the staff interface that
    uses 'Heading A-Z' as the sort order and returns hits.
[3] Run the same search, but with the sort order set to 'None'.
    No hits are returned.
[4] Apply the patch.
[5] Do step 3 again.  This time, hits should be returned.
[6] Verify that prove -v t/db_dependent/Search.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Galen Charlton 2014-01-24 14:05:32 UTC
Pushed to master.  Thanks for the regression test, Tomas!
Comment 9 Fridolin Somers 2014-04-23 16:25:43 UTC
Patch pushed to 3.14.x, will be in 3.14.06