Each week I find thousands of lines like this in zebra-output.log: zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186 They can be found in a 16.11 production log but also on a fresh master. NOTE: 1=8911 refers to searching Host-Item-Number Error 114 says: [114] Unsupported Use attribute -- v2 addinfo '8911' But 8911 is in bib1.att though. What triggers these searches in the codebase ? Any idea ? Do you also see a lot of these errors in your zebra logs ?
(In reply to Marcel de Rooy from comment #0) I can recreate. It seems to be pulling up the details page in the staff client that triggers this. The number at the end of the error is the itemnumber(s) for that record.
So I found him with Nick's comment in catalogue/detail.pl: my $countanalytics= GetAnalyticsCount($item->{itemnumber}); This sub builds a Zebra query with "hi"=itemnumber If you have no records with 773$9 filled, Zebra did not use the index Host-Item-Number and will return error 114 Unsupported Use attribute.
Created attachment 75002 [details] [review] Bug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords If you do not use the EasyAnalyticalRecords feature (introduced with bug 5528), you will have a lot of warnings in zebra-output.log like: zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186 They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl. This sub starts a Zebra search on index 'hi' (Host-Item-Number). If you do not use this field at all (related to 773$9 in MARC21), Zebra returns an Unsupported Use attribute error (114). In making this change, I added one minor change: [1] Remove the commented GetAnalyticsCount in additem.pl and correcting indentation in that loop (removing tabs). So no change at all there. NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two other scripts to this preference too on report 20702. Test plan: [1] If you use EasyAnalytics, verify that there is no change. [2] If you do not, check the zebra-output.log. You should no longer see searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on this index.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The code change makes sense, as does the reasoning behind it, but I can't reproduce on a fresh master install. Could you give more information on the records and framework you used?
(In reply to Charles Farmer from comment #4) > The code change makes sense, as does the reasoning behind it, but I can't > reproduce on a fresh master install. > > Could you give more information on the records and framework you used? Yes, this test plan was a bit short.. On a fresh master, you should be able to recreate this with just one record. You need Zebra obviously. Without this patch: Assuming the pref is disabled and you did not use 773$9, going to catalogue/detail.pl for a record with at least one item, should trigger the search hi=itemnumber. If you did not use 773$9, the Error 114 on 1=8911 should be found in your zebra-output.log. With this patch, you should no longer see 1=8911.
That's perfect. I was able to reproduce and confirm that your patch fixes the issue.
Created attachment 76314 [details] [review] Bug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords If you do not use the EasyAnalyticalRecords feature (introduced with bug 5528), you will have a lot of warnings in zebra-output.log like: zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186 They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl. This sub starts a Zebra search on index 'hi' (Host-Item-Number). If you do not use this field at all (related to 773$9 in MARC21), Zebra returns an Unsupported Use attribute error (114). In making this change, I added one minor change: [1] Remove the commented GetAnalyticsCount in additem.pl and correcting indentation in that loop (removing tabs). So no change at all there. NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two other scripts to this preference too on report 20702. Test plan: [1] If you use EasyAnalytics, verify that there is no change. [2] If you do not, check the zebra-output.log. You should no longer see searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on this index.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Created attachment 76476 [details] [review] Bug 20697: Bind calling GetAnalyticsCount to pref EasyAnalyticalRecords If you do not use the EasyAnalyticalRecords feature (introduced with bug 5528), you will have a lot of warnings in zebra-output.log like: zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186 They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl. This sub starts a Zebra search on index 'hi' (Host-Item-Number). If you do not use this field at all (related to 773$9 in MARC21), Zebra returns an Unsupported Use attribute error (114). In making this change, I added one minor change: [1] Remove the commented GetAnalyticsCount in additem.pl and correcting indentation in that loop (removing tabs). So no change at all there. NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two other scripts to this preference too on report 20702. Test plan: [1] If you use EasyAnalytics, verify that there is no change. [2] If you do not, check the zebra-output.log. You should no longer see searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on this index.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Looks good to me and tests all still pass.. passing QA.
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02, always good to silence some warnings :)
Pushed to 17.11.x for 17.11.08 Work I tried to start a long time ago. I'm pleased to see it done ;)