Duplicate search strings cause search to fail sporadically

Bug #1669522 reported by Andrea Neiman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned

Bug Description

EG 2.12-beta

If you're in a bib record & click on an author/added author to run a new search, the string is duplicated in the search box like so:

Tchaikovsky Peter Ilich Tchaikovsky, Peter Ilich,1840 18931840-1893
Brahms Johannes Brahms, Johannes,1833 18971833-1897

Which results in "no entries were found". I would expect that clicking on an author/added author would run a normal search for that person.

This only happens when clicking author/added author from within the bib record. Clicking a facet or from within the results list doesn't recreate the extra text or the error, nor does clicking a subject or series from within the bib record.

In 2.12 this can cause a search to fail to return results, often but not completely consistently. It didn't seem to matter if I clicked to search on Author (1xx) or Added Author (7xx). This happened in both XUL and Webby, tested on the MLNC 2.12-beta demo server.

In 2.11 the string gets duplicated in a similar manner but I was unable to get a search to fail because of it.

Per Galen, this is a regression introduced by the patch for https://bugs.launchpad.net/evergreen/+bug/1308090

Galen Charlton (gmc)
tags: added: regression
Changed in evergreen:
milestone: none → 2.12-rc
importance: Undecided → High
Andrea Neiman (aneiman)
description: updated
Kathy Lussier (klussier)
Changed in evergreen:
assignee: nobody → Kathy Lussier (klussier)
Revision history for this message
Kathy Lussier (klussier) wrote :

It looks like there was a change to the normalize_qterm block that caused this error. There is no mention in the commit message about changes being made to the qterm, but, from what I can tell, it was an attempt to clean up the subsequent search to remove additional spaces between the search terms. However, instead of replacing the already normalized qterm, this regex seemed to add a string to the qterm, which resulted in duplicate author names and dates being sent in the query.

Since this was an aesthetic concern rather than a functional concern and was not a primary component of the feature that was added, I removed the regex. It seems to be working now.

Working branch at:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/lp1669522-fix-duplicate-author-query

Test plan:

Pre-patch: Retrieve a bib record in the catalog and click one of the author links at the top of the page. The search box on the subsequent search results page will show that the author names and dates were duplicated in the search. After loading the patch, clicking the link should only add each of these search terms once.

tags: added: pullrequest
Kathy Lussier (klussier)
Changed in evergreen:
assignee: Kathy Lussier (klussier) → nobody
Revision history for this message
Chris Sharp (chrissharp123) wrote :
tags: added: signedoff
Revision history for this message
Ben Shum (bshum) wrote :

Pushed Chris' signed off to master. Thanks Kathy and Chris!

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.