Duplicate search strings cause search to fail sporadically
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:/
tags: | added: regression |
Changed in evergreen: | |
milestone: | none → 2.12-rc |
importance: | Undecided → High |
description: | updated |
Changed in evergreen: | |
assignee: | nobody → Kathy Lussier (klussier) |
Changed in evergreen: | |
assignee: | Kathy Lussier (klussier) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
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: git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ kmlussier/ lp1669522- fix-duplicate- author- query
http://
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.