[Bug 28492] New: Hyphen in branchcode gives wrong search results
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28492 Bug ID: 28492 Summary: Hyphen in branchcode gives wrong search results Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org A client noticed that when limiting by branch, some search results were wrong and after a bit of digging, I found that it happens when the branchcode contains a hyphen. I was able to recreate the situation as follows: 1) Go to Administration > Libraries and add the libraries - Fairfield (branchcode FFL) -- if you have the default database, this library should already exist - Fairfield North (branchcode FFL-N) - Fairfield South (branchcode FFLS) 2) Add an item to record A with holding branch FFL-N 3) Add an item to record B with holding branch FFLS 4) reindex if necessary 5) In Advanced search, search for record A and limit to Fairfield North library -- record is in the results - OK 6) In Advanced search, search for record A and limit to Fairfield library -- record is in the results! - NOT OK 7) In Advanced search, search for record B and limit to Fairfield South library -- record is in the results - OK 8) In Advanced search, search for record B and limit to Fairfield library -- record is not in results - OK As you can see, the search for branchcode FFL-N and for branchcode FFL give the same results. The problem was originally found by a client using 18.05.03. I was able to recreate in 20.05.08 and master (21.06.000), always with Zebra. I didn't try with ES because mine is currently broken :( -- 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=28492 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Caroline, that's a known issue. The search by library and others are keyword searches. hyphens are treated as spaces, so FFL-N is "FFL S" and a search for FFL will find it. Same is true for locations, collections etc. I don't think changing the hyphen behavior in general would be a good idea as we want that for normal search. Using "ext" (exact field search) was problematic in the past - it didn't work for libraries using ICU. Not sure if it does now. Safest option might be to avoid hyphens in the codes. -- 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=28492 --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- To add in the manual, no hyphens in branchodes, loc, CCODE -- 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=28492 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Manual -- 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=28492 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs documenting -- 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=28492 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/626 | |https://gitlab.com/koha-com | |munity/koha-manual/-/merge_ | |requests/627 Documentation| |Caroline Cyr La Rose contact| | Status|Needs documenting |RESOLVED -- 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=28492 --- Comment #3 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Not really fixed, but I added the info in the manual... hopefully bug 28495 will prevent users from making mistakes -- 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=28492 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |WONTFIX -- 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=28492 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu, | |katrin.fischer@bsz-bw.de, | |michaela.sieber@kit.edu --- Comment #4 from Michaela Sieber <michaela.sieber@kit.edu> --- Is this still valid? I can not recreate this (with Elastic) We have more than 150 branchcodes with hyphens but never had problems since we started to migrate to Koha (I think we started with Version 21.11) Or is this only a problem with Zebra? -- 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=28492 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I would imagine it's a problem with Elastic too, but depending on your search terms. The problem arises here: branchcodes: A A-B So when searching for A you'd also find A-B, because they are treated as words. -- 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=28492 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #5)
I would imagine it's a problem with Elastic too, but depending on your search terms. The problem arises here:
branchcodes: A A-B
So when searching for A you'd also find A-B, because they are treated as words.
Yeah I'd say it's probably a problem. The same problem exists throughout Koha. Item types, collection codes, locations, etc. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org