Subject heading link includes non-exact matches

Bug #1790231 reported by Jeff Davis
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned
3.1
Won't Fix
Medium
Unassigned
3.2
Won't Fix
Medium
Unassigned
3.3
Won't Fix
Medium
Unassigned
3.4
Won't Fix
Medium
Unassigned
3.5
Won't Fix
Medium
Unassigned

Bug Description

EG 3.1.4

Clicking on a subject heading in the OPAC should only return records using that subject heading. Currently it includes any records where the terms from the heading you clicked on appear somewhere in the subject fields, which is not the same thing.

To put it another way, clicking a subject heading performs the equivalent of a "Contains" subject search from the advanced search page. It should do a "Matches exactly" or "Starts with" search.

Example:
1. Retrieve record 78 (Mozart, Horn concertos).
2. Click the "Concertos (Horn)" subject heading.
3. Results include record 5 (Huntington student recital, Dec. 6, 1999), which does not have "Concertos (Horn)" as a subject heading. It does, however, have "Concertos (Piano) -- Excerpts" and "Horn and piano music".

Tags: needswork opac
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1790231-subject-heading-link-exact-match-search adds "contains=>'exact'" to the query params for subject heading links, forcing an exact-match search when a heading is clicked.

tags: added: opac pullrequest
Garry Collum (gcollum)
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Garry Collum (gcollum) wrote :

I tested using Jeff's strategy and lots more musical terms in the test database. The patch works perfectly. The number of records associated with a subject heading in the facets from a top level search, seemed to coincide with the number of records that you pulled up from clicking on a subject link in a record.

The signed-off patch is at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/gcollum/lp1790231-subject-heading-link-exact-match-search-signoff

tags: added: signedoff
Changed in evergreen:
milestone: none → 3.3.1
importance: Undecided → Medium
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbej)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks for this patch, Jeff, and for the testing, Garry. The only problem I see is with the genre heading links. Those are in a slightly different format (they're written as facets), which don't need and don't play well with contains=>'exact'. With your patch applied, clicking on any genre heading link returns 0 results. I'm adding the needsrepatch tag for this reason.

For your testing pleasure, by the way, here are the IDs of the 21 records in the concerto dataset that include genre headings:

 207
 208
 210
 211
 212
 215
 217
 221
 223
 224
 225
 227
 229
 230
 231
 243
 244
 245
 246
 247
 248

tags: added: needsrepatch
tags: removed: signedoff
Changed in evergreen:
assignee: Jane Sandberg (sandbej) → nobody
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

I've pushed two additional commits to working branch user/jeffdavis/lp1790231-subject-heading-link-exact-match-search. The first new commit accommodates genre and other facet-based subjects where we don't want exact match. The second new commmit applies the fix when display fields are not in use, e.g. when you access the record directly without search terms. All three commits should probably be squashed before merging to master.

tags: removed: needsrepatch
Changed in evergreen:
milestone: 3.3.1 → 3.3.2
Changed in evergreen:
milestone: 3.3.2 → 3.3.3
Changed in evergreen:
milestone: 3.3.3 → 3.4-beta1
Kyle Huckins (khuckins)
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Revision history for this message
Kyle Huckins (khuckins) wrote :

Thanks for this patch and the testing all, however this doesn't seem to be working as expected after rebasing to current master.

Genres work as expected, however with the initial example of record 78, clicking on "Concerto (Horn)" filters the list down to 2 items: Horn Concertos and Huntington Student Recital(noted to not have that subject heading). None of the subject headings under record 207 appear to work, as well. My best guess is that some change has been made to the API that will need to be addressed, though I'm not sure what that change would have been.

Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
tags: added: needsrepatch
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4-beta1 → 3.4-beta2
Galen Charlton (gmc)
Changed in evergreen:
milestone: 3.4-beta2 → 3.4.1
tags: removed: pullrequest
Changed in evergreen:
milestone: 3.4.1 → 3.4.2
Changed in evergreen:
milestone: 3.4.2 → 3.4.3
Changed in evergreen:
milestone: 3.4.3 → 3.4.4
Changed in evergreen:
milestone: 3.4.4 → 3.5.1
Changed in evergreen:
milestone: 3.5.1 → 3.5.2
Changed in evergreen:
milestone: 3.5.2 → 3.6.1
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Changed in evergreen:
milestone: 3.6.2 → 3.6.3
Changed in evergreen:
milestone: 3.6.3 → none
tags: added: needswork
removed: needsrepatch
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.