Bugzilla – Attachment 46512 Details for
Bug 15555
Index 024$a into Identifier-other:u url register when source $2 is uri
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15555 - Index 024$a into Identifier-other:u url register when source $2 is uri
Bug-15555---Index-024a-into-Identifier-otheru-url-.patch (text/plain), 4.91 KB, created by
David Cook
on 2016-01-12 04:19:35 UTC
(
hide
)
Description:
Bug 15555 - Index 024$a into Identifier-other:u url register when source $2 is uri
Filename:
MIME Type:
Creator:
David Cook
Created:
2016-01-12 04:19:35 UTC
Size:
4.91 KB
patch
obsolete
>From 43d551e2dca8b2829ddd8007edfd33d8647e4f8e Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 12 Jan 2016 15:17:35 +1100 >Subject: [PATCH] Bug 15555 - Index 024$a into Identifier-other:u url register > when source $2 is uri > >This patch indexes 024$a into the "phrase" index type, and the "url" index type, >if the 024$2 equals "uri". > >TEST PLAN > >1) Apply the patch. >1b) If you're using a gitified Koha or a git install, >you'll need to upgrade your instance or copy your zebradb files >over to /etc/koha/zebradb or your "kohadev" directory. >2) Add a 024$a with a URL like http://libris.kb.se/resource/bib/219553 > to a bibliographic record >3) Re-index Zebra >4) Type "id-other,st-urx,fuzzy=http://libris.kb.se/resource/bib/219553" > into the "Search the catalog" box in the Staff Client and search >5) Note that you retrieve your record > >NOTE: The fuzzy is required because Koha's query "parsing" functions change >http:// to http=// which won't correctly match the value in the "Identifier-other:u" index. >NOTE: Alternatively, you could do the following search instead: >"id-other,phr=http libris kb se resource bib 219553". > It would work as well by using the "Identifier-other:p" index. > >Advanced tester version: >4) In a terminal window, find the "koha-conf.xml" file in your "etc" directory. >5) Open "koha-conf.xml" and find <listen id="biblioserver">. >Copy the URI you find there. (e.g. unix:/home/dcook/koha-dev/var/run/zebradb/bibliosocket). >6) Type "yaz-client unix:/home/dcook/koha-dev/var/run/zebradb/bibliosocket" >7) After it connects, type "base biblios" and press enter >8) Type "format xml" and press enter >9) Type "elements zebra::index" and press enter >10) Type "f id-other,st-urx=http://libris.kb.se/resource/bib/219553" and press enter >11) Note that you should have at least one result >12) Type "show 1" >13) If you scroll through the results, you should find something like the following: > ><index name="Identifier-other" type="w" seq="28">@^</index> ><index name="Identifier-other" type="w" seq="1"></index> ><index name="Identifier-other" type="w" seq="29">http</index> ><index name="Identifier-other" type="w" seq="30">libris</index> ><index name="Identifier-other" type="w" seq="31">kb</index> ><index name="Identifier-other" type="w" seq="32">se</index> ><index name="Identifier-other" type="w" seq="33">resource</index> ><index name="Identifier-other" type="w" seq="34">bib</index> ><index name="Identifier-other" type="w" seq="35">219553</index> ><index name="Identifier-other" type="p" seq="28">http libris kb se resource bib 219553</index> ><index name="Identifier-other" type="u" seq="36">http://libris.kb.se/resource/bib/219553</index> >--- > .../marc_defs/marc21/biblios/biblio-koha-indexdefs.xml | 5 ++++- > .../marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl | 11 ++++++++++- > 2 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >index 337cb96..160c0cf 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml >@@ -151,7 +151,10 @@ > </index_data_field> > <!--record.abs line 59: melm 024$a Identifier-other--> > <index_subfields tag="024" subfields="a"> >- <target_index>Identifier-other:w</target_index> >+ <target_index>Identifier-other:w Identifier-other:p</target_index> >+ </index_subfields> >+ <index_subfields tag="024" subfields="a" condition="marc:subfield[@code='2' and text()='uri']"> >+ <target_index>Identifier-other:u</target_index> > </index_subfields> > <!--record.abs line 60: melm 024 Identifier-standard--> > <index_data_field tag="024"> >diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >index 1ab1f4c..7b4077d 100644 >--- a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >+++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl >@@ -177,11 +177,20 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xslo:template mode="index_subfields" match="marc:datafield[@tag='024']"> > <xslo:for-each select="marc:subfield"> > <xslo:if test="contains('a', @code)"> >- <z:index name="Identifier-other:w"> >+ <z:index name="Identifier-other:w Identifier-other:p"> > <xslo:value-of select="."/> > </z:index> > </xslo:if> > </xslo:for-each> >+ <xslo:if test="marc:subfield[@code='2' and text()='uri']"> >+ <xslo:for-each select="marc:subfield"> >+ <xslo:if test="contains('a', @code)"> >+ <z:index name="Identifier-other:u"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:if> >+ </xslo:for-each> >+ </xslo:if> > </xslo:template> > <xslo:template mode="index_subfields" match="marc:datafield[@tag='041']"> > <xslo:for-each select="marc:subfield"> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15555
:
46512
|
46567
|
50261