[Koha] Error when searching using Zebra index 'arp'

Barton Chittenden barton at bywatersolutions.com
Tue Jun 5 05:37:51 NZST 2018


Here's the full 526 tag from biblio-zebra-indexdefs.xsl

  <xslo:template mode="index_subfields" match="marc:datafield[@tag='526']">
    <xslo:for-each select="marc:subfield">
      <xslo:if test="contains('c', @code)">
        <z:index name="arl:w arl:n">
          <xslo:value-of select="."/>
        </z:index>
      </xslo:if>
    </xslo:for-each>
    <xslo:for-each select="marc:subfield">
      <xslo:if test="contains('d', @code)">
        <z:index name="arp:w arp:n">
          <xslo:value-of select="."/>
        </z:index>
      </xslo:if>
    </xslo:for-each>
  </xslo:template>

I ran the following:

xsltproc
/etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
    <(sudo koha-mysql INSTANCE <<< \
    "select  metadata from biblio_metadata
     where ExtractValue(
               metadata, '//datafield[@tag=526]/subfield[@code=\"d\"]'
     )  != '' limit 1\\G" | \
     sed -n 's/metadata: //;2,$p' )

This gives

...
  <z:index name="Control-number:w">ocm28255589 </z:index>
...
  <z:index name="arl:w arl:n">5.5</z:index>
  <z:index name="arp:w arp:n">14</z:index>
...

So I think the indexdefs files are fine.

Searching using 'arl:..." does work, it's only "arp:..." that's failing.

I also tried the following in yaz-client:

f @attr 1=9013 14

Sent searchRequest.
Received SearchResponse.
Search was a bloomin' failure.
Number of hits: 0, setno 2
Result Set Status: none
records returned: 0
Diagnostic message(s) from database:
    [114] Unsupported Use attribute -- v2 addinfo '9013'
Elapsed: 0.011477

I then tried
f ocm28255589
format xml

...
  <datafield tag="526" ind1="0" ind2=" ">
    <subfield code="a">Accelerated Reader AR</subfield>
    <subfield code="c">5.5</subfield>
    <subfield code="d">14</subfield>
    <subfield code="z">HS.</subfield>
  </datafield>
...

... for some reason, I'm not seeing any of the index names, I'm used to
seeing

Z> format xml
Z> show
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: XML
<?xml version="1.0" encoding="UTF-8"?>
<z:record xmlns:z="http://indexdata.com/zebra-2.0" xmlns:marc="
http://www.loc.gov/MARC21/slim" xmlns:kohaidx="
http://www.koha-community.org/schemas/index-defs
" type="update" z:id="1">
  <z:index name="llength:w">     </z:index>
  <z:index name="rtype:w">a</z:index>
  <z:index name="Bib-level:w">m</z:index>

I've attached /etc/koha/marc21-retrieval-info-bib-dom.xml



On Mon, Jun 4, 2018 at 11:27 AM, Barton Chittenden <
barton at bywatersolutions.com> wrote:

> I'm trying to trouble-shoot an error with the 'arp' index (accelerated
> reading point -- indexed at 526$d).
>
> I'm searching for
>
>     arp:14
>
> In the staff client and opac and getting no results.
>
> I added 'request' to zebra_loglevels in $KOHA_CONF and found the following
> error:
>
> 09:30:50-04/06 zebrasrv(98) [request] Search biblios ERROR 114 1 1+0 RPN
> @attrset Bib-1 @attr 1=9013 @attr 2=3 14
>
> A google search for 'zebra ERROR 114' lead me to
>
> https://lists.katipo.co.nz/public/koha/2015-September/043604.html
>
> Which fixed the error by switching from GRS to DOM ... I didn't think that
> was the problem, but I checked anyway, $KOHA_CONF *does* show
> <zebra_bib_index_mode>dom</zebra_bib_index_mode>
>
> http://lists.indexdata.dk/pipermail/zebralist/2009-November/002326.html
>
> Says "I am told by those in the know that the ERROR 114 refers to an
> unknown / unmapped
> MARC field."
>
> Here's how it's indexed in biblio-koha-indexdefs.xml:
>
>   <!--record.abs line 155: melm 526$d      arp,arp:n-->
>   <index_subfields tag="526" subfields="d">
>     <target_index>arp:w</target_index>
>     <target_index>arp:n</target_index>
>   </index_subfields>
>
> in biblio-zebra-indexdefs.xsl:
>
>     <xslo:for-each select="marc:subfield">
>       <xslo:if test="contains('d', @code)">
>         <z:index name="arp:w arp:n">
>           <xslo:value-of select="."/>
>         </z:index>
>       </xslo:if>
>     </xslo:for-each>
>
> According to indexdata's git site:
>
> "error 114 - unsupported use attribute."
>
> http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commit;h=
> 10d6601ca574d93bd5534b3a997a6b12305c75bc
>
> Looking in ccl.properties and bib1.att, I see that we have two indexes
> using attribute 9013; I'm not sure if that's the problem or not...
>
> grep 9013 /etc/koha/zebradb/ccl.properties
> not-onloan-count 1=9013 4=109
> arp 1=9013 r=r
>
> grep 9013 /etc/koha/zebradb/biblios/etc/bib1.att
> att 9013    not-onloan-count
> att 9013    arp
>
> Any suggestions welcome!
>
> Thanks,
>
> --Barton
>


More information about the Koha mailing list