SRU incorrect nesting of site param
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
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 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When you do an SRU search at a specific org unit, a "site" parameter is appended to your search terms in a way that can mess up your query.
Suppose you submit this search to /opac/extras/
eg.keyword = 9780387095141 or eg.keyword = 0387095144
Evergreen extracts the SYS1 shortname from the endpoint URL and simply appends it to your query:
SRU search string [eg.keyword = 9780387095141 or eg.keyword = 0387095144] converted to [eg.keyword:
There's an order-of-operations problem here. We intended this:
( eg.keyword:
But we effectively got this instead:
eg.keyword:
The easiest solution is to wrap our entire query in parentheses before appending the site param. I'll share a branch for this momentarily.
Changed in evergreen: | |
milestone: | 3.4-beta1 → 3.4-beta2 |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in evergreen: | |
milestone: | 3.4-beta2 → 3.4.1 |
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.5.0 |
Changed in evergreen: | |
milestone: | 3.5.0 → 3.5.1 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Note that Boolean searches of site-scoped Z39.50 endpoints will be affected by this bug, since Z39.50 uses SRU.
****
Working branch user/jeffdavis/ lp1833300- sru-site- param-nesting has the aforementioned fix.
To test:
1. Submit an SRU search to /opac/extras/ sru/SYS1/ holdings? version= 1.1&operation= searchRetrieve& query=( eg.keyword% 20=%20978038709 5141%20or% 20eg.keyword% 20=%20038709514 4)&maximumRecor ds=0
2. Logs should show the search with the incorrectly nested site param: 9780387095141 || eg.keyword: 0387095144 site:SYS1]
SRU search string [(eg.keyword = 9780387095141 or eg.keyword = 0387095144)] converted to [eg.keyword:
3. Apply the patch and restart Evergreen.
4. Redo the search from step 1.
5. Logs should show that the site param is now correctly nested: 9780387095141 || eg.keyword: 0387095144) site:SYS1]
SRU search string [eg.keyword = 9780387095141 or eg.keyword = 0387095144] converted to [(eg.keyword: