[Bug 14031] New: Itemnumber should be a numeric search in ccl.properties
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Bug ID: 14031 Summary: Itemnumber should be a numeric search in ccl.properties Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Z39.50 / SRU / OpenSearch Servers Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl At the moment, if you do a search in the OPAC or staff client for "itemnumber:1", you'll get no results even when you have an item with an itemnumber of 1. That's because Zebra defaults to a word list search, but there is no word index for itemnumber. It's a numeric index. So, to find that item, you'll have to try "itemnumber,st-numeric:1". However, by tweaking ccl.properties, we can make "itemnumber:1" work as well. We already do this for "notforloan" which we know will always be numeric. Current ccl.properties: notforloan 1=8008 4=109 itemnumber 1=8010 4=109 is the PQF/RPN for "st-numeric". So... let's just add "4=109" to itemnumber, and be merry! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 38223 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38223&action=edit Bug 14031 - Itemnumber should be a numeric search in ccl.properties This patch changes the "itemnumber" alias so that it acts like "itemnumber,st-numeric". That is, it always does a numeric search. _TEST PLAN_ The best way to test this patch is to apply the patch and then run "make upgrade", I suspect. As this will refresh your "ccl.properties". However, this patch is actually really small, so you can just apply it manually to an existing "ccl.properties" if you rather save time. Basically, you just need to do the following steps: 0) Do a search for "itemnumber:<insert real indexed itemnumber here>" 1) Note that you can't retrieve any results 2) Change your ccl.properties to say "itemnumber 1=8010 4=109" 3) Repeat the search for "itemnumber:<X>" 4) Note that you now retrieve your result -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38223|0 |1 is obsolete| | --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- Created attachment 39897 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39897&action=edit Bug 14031 - Itemnumber should be a numeric search in ccl.properties This patch changes the "itemnumber" alias so that it acts like "itemnumber,st-numeric". That is, it always does a numeric search. _TEST PLAN_ The best way to test this patch is to apply the patch and then run "make upgrade", I suspect. As this will refresh your "ccl.properties". However, this patch is actually really small, so you can just apply it manually to an existing "ccl.properties" if you rather save time. Basically, you just need to do the following steps: 0) Do a search for "itemnumber:<insert real indexed itemnumber here>" 1) Note that you can't retrieve any results 2) Change your ccl.properties to say "itemnumber 1=8010 4=109" 3) Repeat the search for "itemnumber:<X>" 4) Note that you now retrieve your result Signed-off-by: Magnus Enger <magnus@libriotech.no> Tested on a gitified package install. Made the change to /etc/koha/zebradb/ccl.properties manually. After this change I can successfully search for "itemnumber:1". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- It does not work for UNIMARC, the itemnumber is not indexed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Shouldn't we do the same for the biblionumber? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #3)
It does not work for UNIMARC, the itemnumber is not indexed.
In that case, perhaps I should amend the name of the bug to be MARC21/NORMARC specific? Do you want itemnumber to be indexed in UNIMARC? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #4)
Shouldn't we do the same for the biblionumber?
"biblionumber" isn't indexed in MARC21, although the biblionumber is indexed as "local-number" in MARC21. It's indexed as "numeric" and "word" though, so I haven't encountered this problem with it before. I suppose it might be worthwhile having a larger discussion about what indexes should exist and how we index them... (as numeric, word, phrase, etc) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to David Cook from comment #5)
(In reply to Jonathan Druart from comment #3)
It does not work for UNIMARC, the itemnumber is not indexed.
In that case, perhaps I should amend the name of the bug to be MARC21/NORMARC specific?
Do you want itemnumber to be indexed in UNIMARC?
Ccing Fridolin as a Zebra and UNIMARC expert :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #7)
(In reply to David Cook from comment #5)
(In reply to Jonathan Druart from comment #3)
It does not work for UNIMARC, the itemnumber is not indexed.
In that case, perhaps I should amend the name of the bug to be MARC21/NORMARC specific?
Do you want itemnumber to be indexed in UNIMARC?
Ccing Fridolin as a Zebra and UNIMARC expert :)
No lib as never asked for it I think. I'd say keep it not indexed. Note that using numeric search is only useful when using comparisons greater or lower than. Default search is phrase so indexing itemnumber subfield as phrase should be enough to allow searching : "itemnumber:9999" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Fridolin SOMERS from comment #8)
Note that using numeric search is only useful when using comparisons greater or lower than.
That's probably a valid point. We could probably add itemnumber to a non-numeric index for MARC21, although then we're indexing it twice when we could just index it once and change the CCL alias instead.
Default search is phrase so indexing itemnumber subfield as phrase should be enough to allow searching : "itemnumber:9999"
I believe the default search is actually wordlist (:w), but that's true enough. In MARC21, the biblionumber is indexed like so: "Local-Number:n Local-Number:w Local-Number:s". So "local-number:9999" will get you the biblionumber stored in the local-number "w" index. The ":s" is probably unnecessary as that's just for sorting... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39897|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 41382 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41382&action=edit Bug 14031 - Itemnumber should be a numeric search in ccl.properties This patch changes the "itemnumber" alias so that it acts like "itemnumber,st-numeric". That is, it always does a numeric search. _TEST PLAN_ The best way to test this patch is to apply the patch and then run "make upgrade", I suspect. As this will refresh your "ccl.properties". However, this patch is actually really small, so you can just apply it manually to an existing "ccl.properties" if you rather save time. Basically, you just need to do the following steps: 0) Do a search for "itemnumber:<insert real indexed itemnumber here>" 1) Note that you can't retrieve any results 2) Change your ccl.properties to say "itemnumber 1=8010 4=109" 3) Repeat the search for "itemnumber:<X>" 4) Note that you now retrieve your result Signed-off-by: Magnus Enger <magnus@libriotech.no> Tested on a gitified package install. Made the change to /etc/koha/zebradb/ccl.properties manually. After this change I can successfully search for "itemnumber:1". Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks David! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Z39.50 / SRU / OpenSearch |Searching |Servers | CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14031 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Itemnumber should be a |Make itemnumber a numeric |numeric search in |search in ccl.properties |ccl.properties | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org