[Bug 31841] New: Shelving location search in staff interface dropdown yields invalid Zebra search
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Bug ID: 31841 Summary: Shelving location search in staff interface dropdown yields invalid Zebra search Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Zebra Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au If you choose "Shelving location" in the staff interface dropdown menu, it generates an invalid Zebra search. Example: 14:21:54-17/10 zebrasrv(3) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @or @or @attr 1=8013 @attr 4=1 @attr 6=3 @attr 9=32 @attr 2=102 WEB @attr 1=8013 @attr 4=1 @attr 9=26 @attr 2=102 WEB @a ttr 1=8013 @attr 4=6 @attr 9=20 @attr 2=102 WEB Here's what we actually want to create: 14:21:48-17/10 zebrasrv(2) [request] Search biblios OK 20892 1 1+0 RPN @attrset Bib-1 @attr 1=8013 @attr 4=6 @attr 2=102 WEB -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Ok it's working in master although it doesn't set the index dropdowns correctly so I guess I can re-purpose this report... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Shelving location search in |Shelving location index not |staff interface dropdown |correctly set for "Search |yields invalid Zebra search |within results" or "Edit | |this search" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Or maybe not... certain permutations of sysprefs don't work... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Shelving location index not |Shelving location search in |correctly set for "Search |staff interface sometimes |within results" or "Edit |creates invalid Zebra query |this search" | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- In Master: 1) Turn off QueryAutoTruncate 2) Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=GEN&idx=location 3) Note "No results found" The problem is that QueryWeightFields adds a "phr" qualifier which is a problem since "location" doesn't have a phrase index defined...: (rk=( location,ext,r1=" GEN " or location,phr,r3=" GEN " or location,wrdl,r6=" GEN " or location,wrdl,fuzzy,r8=" GEN " or location,wrdl,rt,r9=""gen"? ")) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- Created attachment 141950 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141950&action=edit Bug 31841: Use location,wrdl when searching Shelving location The "location" index only has a word index defined, so we need to specify the wrdl qualifier when searching it via the staff interface dropdown menu Test plan: 1) Change QueryAutoTruncate to "only if * is added" 2) Change IntranetCatalogSearchPulldown to "Show" 3) Search for "Shelving location" of "GEN" in catalogue search bar 4) Note no results returned 5) Apply patch 6) koha-plack --restart kohadev 7) Repeat Step #3 8) Note that results appear for 'location,wrdl: GEN' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi David, did you mean to sign-off here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #5)
Hi David, did you mean to sign-off here?
I'm not sure I understand the question? 😅 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Cook from comment #6)
(In reply to Katrin Fischer from comment #5)
Hi David, did you mean to sign-off here?
I'm not sure I understand the question? 😅
Sorry, I got confused :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #7)
Sorry, I got confused :)
No worries! I'd love to someone to sign it off though heh. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> ---
since "location" doesn't have a phrase index defined... Why not add it to Zebra MARC21 configuration ?
Even if unlikely : Imagine two locations "foo bar" and "bar foo", words list type search "wrdl" will match both. This indexing can be useful for other cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #10 from David Cook <dcook@prosentient.com.au> --- (In reply to Fridolin Somers from comment #9)
since "location" doesn't have a phrase index defined... Why not add it to Zebra MARC21 configuration ?
I suppose I try to avoid Zebra config changes that require people to re-index but fair point!
Even if unlikely : Imagine two locations "foo bar" and "bar foo", words list type search "wrdl" will match both.
True although I have wanted to limit authorized value codes for a while so that they can only be alphanumeric and have no spaces heh. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |magnus@libriotech.no --- Comment #11 from Magnus Enger <magnus@libriotech.no> --- Sorry, patch does not apply and I don't see how to resolve the conflict: $ git bz apply 31841 Bug 31841 - Shelving location search in staff interface sometimes creates invalid Zebra query 141950 - Bug 31841: Use location,wrdl when searching Shelving location Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 31841: Use location,wrdl when searching Shelving location Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc error: Failed to merge in the changes. Patch failed at 0001 Bug 31841: Use location,wrdl when searching Shelving location hint: Use 'git am --show-current-patch=diff' to see the failed patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-31841-Use-locationwrdl-when-searching-Shelving-qsJQXm.patch <<<<<<< HEAD [% IF ms_location %] <option selected="selected" value="location" title="Enter location code value for search">Shelving location (code)</option> ======= [% IF ms_locationcommawrdl %] <option selected="selected" value="location,wrdl" title="Enter location code value for search">Shelving location (code)</option>
> Bug 31841: Use location,wrdl when searching Shelving location
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Thanks for looking Magnus. It's a simple fix. I'll look at doing that now actually... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- (In reply to Fridolin Somers from comment #9)
since "location" doesn't have a phrase index defined... Why not add it to Zebra MARC21 configuration ?
Even if unlikely : Imagine two locations "foo bar" and "bar foo", words list type search "wrdl" will match both.
This indexing can be useful for other cases.
It might be worth adding that the status quo right now is doing a "wrdl" search for "location", so I'm just trying to make the status quo explicit and functional in all cases. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141950|0 |1 is obsolete| | --- Comment #14 from David Cook <dcook@prosentient.com.au> --- Created attachment 148848 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148848&action=edit Bug 31841: Use location,wrdl when searching Shelving location The "location" index only has a word index defined, so we need to specify the wrdl qualifier when searching it via the staff interface dropdown menu Test plan: 1) Change QueryAutoTruncate to "only if * is added" 2) Change IntranetCatalogSearchPulldown to "Show" 3) Search for "Shelving location" of "GEN" in catalogue search bar 4) Note no results returned 5) Apply patch 6) koha-plack --restart kohadev 7) Repeat Step #3 8) Note that results appear for 'location,wrdl: GEN' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Cook from comment #13)
(In reply to Fridolin Somers from comment #9)
since "location" doesn't have a phrase index defined... Why not add it to Zebra MARC21 configuration ?
Even if unlikely : Imagine two locations "foo bar" and "bar foo", words list type search "wrdl" will match both.
This indexing can be useful for other cases.
It might be worth adding that the status quo right now is doing a "wrdl" search for "location", so I'm just trying to make the status quo explicit and functional in all cases.
OKi no problem. A fix that works is a good fix ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148848|0 |1 is obsolete| | --- Comment #16 from Magnus Enger <magnus@libriotech.no> --- Created attachment 148856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148856&action=edit Bug 31841: Use location,wrdl when searching Shelving location The "location" index only has a word index defined, so we need to specify the wrdl qualifier when searching it via the staff interface dropdown menu Test plan: 1) Change QueryAutoTruncate to "only if * is added" 2) Change IntranetCatalogSearchPulldown to "Show" 3) Search for "Shelving location" of "GEN" in catalogue search bar 4) Note no results returned 5) Apply patch 6) koha-plack --restart kohadev 7) Repeat Step #3 8) Note that results appear for 'location,wrdl: GEN' Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148856|0 |1 is obsolete| | --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 148916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148916&action=edit Bug 31841: Use location,wrdl when searching Shelving location The "location" index only has a word index defined, so we need to specify the wrdl qualifier when searching it via the staff interface dropdown menu Test plan: 1) Change QueryAutoTruncate to "only if * is added" 2) Change IntranetCatalogSearchPulldown to "Show" 3) Search for "Shelving location" of "GEN" in catalogue search bar 4) Note no results returned 5) Apply patch 6) koha-plack --restart kohadev 7) Repeat Step #3 8) Note that results appear for 'location,wrdl: GEN' Signed-off-by: Magnus Enger <magnus@libriotech.no> Works as advertised. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #19 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to stable |RESOLVED CC| |lucas@bywatersolutions.com --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply cleanly to 22.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31841 --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Cook from comment #3)
In Master: 1) Turn off QueryAutoTruncate 2) Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=GEN&idx=location 3) Note "No results found"
The problem is that QueryWeightFields adds a "phr" qualifier which is a problem since "location" doesn't have a phrase index defined...:
(rk=( location,ext,r1=" GEN " or location,phr,r3=" GEN " or location,wrdl,r6=" GEN " or location,wrdl,fuzzy,r8=" GEN " or location,wrdl,rt,r9=""gen"? "))
We have seen other problems like that. We should add phrase search to all search fields to fix once and for all. But for this cas, it disables autotruncation of location code, so its a good fix. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org