[Bug 14527] New: zebra error 114 when searching for items added before or after a specific date
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 Bug ID: 14527 Summary: zebra error 114 when searching for items added before or after a specific date Change sponsored?: --- Product: Koha Version: 3.20 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P5 - low Component: Label/patron card printing Assignee: cnighswonger@foundations.edu Reporter: pedro.m.ferreira@mail.cm-portel.pt QA Contact: testopia@bugs.koha-community.org Created attachment 40967 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40967&action=edit printscreen of zebra error Hello when i am adding a new bathc for labeling in 127.0.1.1:8080/cgi-bin/koha/cgi-bin/labels/label-item-search.pl and searching on or after a specific date, ZEBRA returns the error: Search biblios ERROR 114 1+0 RPN @attrset Bib-1 @attr 1=32 @attr 4=5 @attr 2=4 2015-07-13 And no data is returned. in the attachement i send two printscreen -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- You might consider the mailing lists (http://koha-community.org/support/koha-mailing-lists/) for finding a resolution to this problem. How did you install Koha? Do any search queries return results? You can see a fuller explanation of error codes here (http://www.loc.gov/z3950/agency/defns/bib1diag.html), but I've noticed error 114 happens when you don't have anything indexed. My guess is that you installed Koha via git or the tarball? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have asked him to file the bug, but haven't got around to test and confirm the problem. Maybe someone else can? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, it seems t work on on master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- I would be really curious to know if Pedro is able to get search results back for any query. It really does sound to me like an empty Zebra database or at the very least an empty index being searched. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #5 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Created attachment 40983 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40983&action=edit printscreen of zebra search by title -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #6 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- hello, When i search by title or anything else it returns the correct search result. I attached two printscreens. My koha was installed in a tarball, version 3.20. Thanks -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- (In reply to Pedro Ferreira from comment #6)
hello, When i search by title or anything else it returns the correct search result. I attached two printscreens.
My koha was installed in a tarball, version 3.20.
Thanks
Mmm, thanks for those screenshots. Well, it looks like the Zebra indexing is running or you wouldn't get any results... and it looks like there are values in "dateaccessioned" as they're showing up in the search results. However, when I look at the code, it looks like the item values in the search results are coming directly from the database and not from the record returned by Zebra. I'm still thinking it's a problem of the Zebra indexes not being up-to-date. Pedro, how is your Zebra indexing running? A cronjob? Or did you run rebuild_zebra.pl manually in the past? I'm guessing that maybe you indexed your bibliographic records, then added items, and the records haven't been indexed again, so you're getting these errors because the index for the item's "dateaccessioned" is empty. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #8 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Created attachment 41006 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41006&action=edit Zebra re-index -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #9 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Hello i re-index zebra and preform the search by date,it returned no output. The data error in zebra is the same, ERROR 114. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #10 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- using the search data in the screenshot i performed the same search with yaz client. so i did YAZ-CLIENT>f @attr 1=32 @attr 4=5 @attr 2=4 2015-07-05 Sent searchRequest. Received SearchResponse. Search was a bloomin' failure. Number of hits: 0, setno 7 Result Set Status: none records returned: 0 Diagnostic message(s) from database: [114] Unsupported Use attribute -- v2 addinfo '32' Elapsed: 0.000181 -------- Here i can see the 114 error, but i dont know what is @attr 1=32 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #11 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Hello in this demos http://koha-community.org/demo/ the marc21 demos do not suffer from the bug but the unimarc demos do suffer from the bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I don't see any error in my local Unimarc installation - but I don't get any results either as soon as I add dates to the mix. Could someone else test this on a Unimarc installation maybe? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- (In reply to Pedro Ferreira from comment #11)
Hello in this demos http://koha-community.org/demo/
the marc21 demos do not suffer from the bug but the unimarc demos do suffer from the bug.
I should've asked you a while ago whether you were using marc21 or unimarc, as that has an enormous impact on how the indexing is done for items... This indeed looks like an indexing configuration bug. If you compare the Zebra indexing files for marc21 vs unimarc, you'll find that the Date-of-acquisition index (ie @attr 1=32) is filled by items in MARC21 but not by UNIMARC. In UNIMARC, the only data going into this index is from 099$c, and I'm guessing that you don't have any data in that field in any of the records you're indexing, which is why you're getting this 114 error. etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl It might be a good idea to add Fridolyn to this bug, as I'm not very familiar with UNIMARC or how it's generally handled by Koha. It looks like etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl might need a bit of an update. According to unimarc_framework_DEFAULT.sql, 995$5 is date acquired, so it should be indexed into "Date-of-acquisition" for this search to work... It looks like there's some weird stuff happening in etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl as well... like 995$3 which is use restrictions appears to be indexed as withdrawn. Also, lots of the item data is being indexed into an 'item' index... which seems odd to me. I suppose that's an attempt at an item-level "any" index? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #14 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- can anyone guide me to sort this problem ..? thanks -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- (In reply to Pedro Ferreira from comment #14)
can anyone guide me to sort this problem ..? thanks
That's a fair question. It looks like your etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl file needs the following block added within the <xslo:template mode="index_subfields" match="marc:datafield[@tag='995']"> element. <xslo:for-each select="marc:subfield"> <xslo:if test="contains('5', @code)"> <z:index name="Date-of-acquisition:w Date-of-acquisition:d Date-of-acquisition:s"> <xslo:value-of select="."/> </z:index> </xslo:if> </xslo:for-each> So that it looks like: <xslo:template mode="index_subfields" match="marc:datafield[@tag='995']"> <xslo:for-each select="marc:subfield"> <xslo:if test="contains('5', @code)"> <z:index name="Date-of-acquisition:w Date-of-acquisition:d Date-of-acquisition:s"> <xslo:value-of select="."/> </z:index> </xslo:if> </xslo:for-each> After patching the file, you can re-index Zebra, and then it should work. It would probably be prudent for a developer to add it to the Koha codebase as well. I don't use UNIMARC, so it's not really a problem for my libraries and I, but I'm sure that this problem would raise its head with others. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- Typically, it's not a good idea to patch individual files, and instead wait for bug fix updates, but since this is a configuration file stored in /etc... I don't think bug fix updates will touch it. I think if it were fixed in master, it would only be fixed for new installs... perhaps someone else can correct me... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Cook from comment #16)
Typically, it's not a good idea to patch individual files, and instead wait for bug fix updates, but since this is a configuration file stored in /etc... I don't think bug fix updates will touch it.
I think if it were fixed in master, it would only be fixed for new installs... perhaps someone else can correct me...
I don't think that's quite correct and depending on how you installed it different things might happen. For an older standard installation, rerunning the Makefile.pl during the update process will update your index definitions as well: perl Makefile.PL --prev-install-log <path> make make test sudo make upgrade I am adding Robin because I think he can tell what happens for a package installation. To my knowledge the index definitions are updated there as well - we build our own packages with some additional indexes and that seems to work perfectly fine. But I think local changes might create problems and even keep the files from updating. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #18 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- In UNIMARC, Date-of-acquisition is usually defined in 099$c, this is the default Zebra configuration. One must use the script misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl to copy creation date from database to 099$c. We usually set it nightly to only update daily modified/created records : misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl --run --where "TO_DAYS(NOW()) - TO_DAYS(biblio.datecreated) <= 1 OR TO_DAYS(NOW()) - TO_DAYS(DATE(biblio.timestamp)) <= 1" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Fridolin, I think the dateaccessioned in MARC21 is a item field related to acquisitions - does UNIMARC have no dateaccessioned or similar in 995? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #20 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Katrin Fischer from comment #17)
I am adding Robin because I think he can tell what happens for a package installation. To my knowledge the index definitions are updated there as well - we build our own packages with some additional indexes and that seems to work perfectly fine. But I think local changes might create problems and even keep the files from updating.
It should be OK. I haven't tested this, but I would expect it would warn you that it's changed and ask you if you want to keep your own version or if you want to install the packaged version. Either way, it'll keep the other version named with the extension .dpkg-{dist,orig} -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #21 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #19)
Hi Fridolin, I think the dateaccessioned in MARC21 is a item field related to acquisitions - does UNIMARC have no dateaccessioned or similar in 995?
I can't find anything. I've seen it sometimes in a numeric subfield. Maybe there is no convention. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pedro, have you followed the discussion? It looks like there is no date_accessioned in the item in UNIMARC - can you confirm this for your installation? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #23 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Hello , yes i can confirm that there is no 999$c field doing a grep i get xekhz@mail:/var/www/koha3.20/etc/zebradb/marc_defs/unimarc/biblios$ grep 999 biblio-zebra-indexdefs.xsl <xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0"> but i think the filed 995 is what i need, because date-of-aquisition is field 995 in unimarc. doing a grep xekhz@mail:/var/www/koha3.20/etc/zebradb/marc_defs/unimarc/biblios$ grep 995 biblio-zebra-indexdefs.xsl <xslo:template mode="index_subfields" match="marc:datafield[@tag='995']"> <xslo:template mode="index_data_field" match="marc:datafield[@tag='995']"> <xslo:template mode="index_facets" match="marc:datafield[@tag='995']"> xekhz@mail:/var/www/koha3.20/etc/zebradb/marc_defs/unimarc/biblios$ ... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #24 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Pedro, not sure you grepped for the right things. Maybe a good first step would be to see if you currently store a dateaccessioned in your items or bibliographic data - checking the Koha-to-MARC-mappings for it and also the bibliographic frameworks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #25 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- Hello, koha to marc mapping i have in the items tab itemnumber 995 9 Internal item number (Koha itemnumber, autogenerated) Alterar barcode 995 f Barcode Alterar dateaccessioned 995 5 Date acquired Alterar homebranch 995 b Origin of item (home branch) (coded) Alterar in a test koha, i created the 995$c and liked it to the database field date-of-aquisition. Re-index the zebra and the search is empty. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14527 --- Comment #26 from Pedro Ferreira <pedro.m.ferreira@mail.cm-portel.pt> --- any news how to solve the problem... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org