Bug 11533 - "use" QueryParser breaks authority search
Summary: "use" QueryParser breaks authority search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-13 19:20 UTC by Tomás Cohen Arazi
Modified: 2014-12-07 20:05 UTC (History)
1 user (show)

See Also:
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 (1.60 KB, patch)
2014-01-13 19:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 11533: (regression test) QP breaks authority search (1.64 KB, patch)
2014-01-16 20:39 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 11533: fix authority searching with no sorting when QueryParser is enabled (3.42 KB, patch)
2014-01-16 20:39 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 11533: fix authority searching with no sorting when QueryParser is enabled (3.47 KB, patch)
2014-01-22 15:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 11533: (regression test) QP breaks authority search (1.70 KB, patch)
2014-01-24 13:41 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 11533: fix authority searching with no sorting when QueryParser is enabled (3.53 KB, patch)
2014-01-24 13:41 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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