Bug 20723

Summary: Author links containing hyphen do not return results.
Product: Koha Reporter: Barton Chittenden <barton>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook
Version: 17.11   
Hardware: All   
OS: All   
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: Marc data known to illustrate the problem.

Description Barton Chittenden 2018-05-07 20:07:47 UTC
Created attachment 75144 [details]
Marc data known to illustrate the problem.

A keyword search for Gene Porter Stratton generates author links of the form

{STAFF URL}/cgi-bin/koha/catalogue/search.pl?q=au:%22Stratton-Porter,%20Gene,%22

This link will return no results.

If I replace the hyphen with %20 (i.e. a URL encoded space), the search works:

{STAFF URL}/cgi-bin/koha/catalogue/search.pl?q=au:%22Stratton%20Porter,%20Gene,%22

To replicate:

Do a keyword search for an author with a hyphenated name (I've attached a marc record that has Gene Porter-Stratton for convenience).

On the results list page or the detail page, click on the link with the author's name, e.g.

    By: Stratton-Porter, Gene, 1863-1924.

The results will look like this:

    No results found
    No results match your search for 'au:"Stratton-Porter, Gene,"' in 
    Some Library

Back up to the previous page. Copy the link url into a text editor. Change the dash to a hyphen. Note that the search succeeds.
Comment 1 David Cook 2022-12-06 05:29:02 UTC
This is almost certainly caused by the Zebra 2.0.59 bug. 

If it's not, feel free to re-open.