Bugzilla – Attachment 31368 Details for
Bug 12872
Exclude some fields from Zebra indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12872: Exclude limited number of fields from Zebra DOM indexing
Bug-12872-Exclude-limited-number-of-fields-from-Ze.patch (text/plain), 3.22 KB, created by
Marcel de Rooy
on 2014-09-04 12:32:24 UTC
(
hide
)
Description:
Bug 12872: Exclude limited number of fields from Zebra DOM indexing
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2014-09-04 12:32:24 UTC
Size:
3.22 KB
patch
obsolete
>From 6a2d1136c9a1cc943abca8e4acee95afe883de27 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 4 Sep 2014 13:39:58 +0200 >Subject: [PATCH] Bug 12872: Exclude limited number of fields from Zebra DOM > indexing >Content-Type: text/plain; charset=utf-8 > >This is a pragmatic approach to exclude some fields from the Any index. >The index_all routine in koha-indexdefs-to-zebra.xsl is renamed to >index_most and includes a choose-when construct to exclude some >fields from indexing. >This seems a simpler approach than removing this routine and adding Any >almost anywhere :) > >Test plan: >Put some uncommon string like jh234gj23 into 952$e somewhere. >Copy the xsl file to your Zebra indexing folders. >Run the xsl to produce a new biblio-zebra-indexdefs.xsl. >Restart Zebra and reindex. >Check if you can still find the uncommon word. >Now uncomment the line in koha-indexdefs-to-zebra.xsl. >Rerun the xsl, restart and reindex. >You should not find the uncommon word in the added 952$e. >--- > etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 23 ++++++++++++++++++----- > 1 files changed, 18 insertions(+), 5 deletions(-) > >diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >index 1488b1c..83b2b64 100644 >--- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >+++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl >@@ -61,7 +61,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xslo:apply-templates mode="index_heading_conditional"/> > <xslo:apply-templates mode="index_match_heading"/> > <xslo:apply-templates mode="index_subject_thesaurus"/> >- <xslo:apply-templates mode="index_all"/> >+ <xslo:apply-templates mode="index_most"/> > </z:record> > </xslo:template> > >@@ -73,10 +73,23 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) > <xsl:call-template name="handle-index-heading-conditional"/> > <xsl:call-template name="handle-index-match-heading"/> > <xsl:apply-templates/> >- <xslo:template mode="index_all" match="text()"> >- <z:index name="Any:w Any:p"> >- <xslo:value-of select="."/> >- </z:index> >+ <xslo:template mode="index_most" match="text()"> >+ <xslo:choose> >+ <xslo:when test="0=1"/> >+<!-- NOTE: When you want to exclude a field, uncomment the following line and >+ edit the field/subfield. (Now it excludes 952$e.) >+ You could add excludes by copying the line. >+ Run this xsl transformation to generate a new biblio-zebra-indexdefs.xsl, >+ restart Zebra and reindex your data. --> >+<!-- >+ <xslo:when test="ancestor::node()[@tag='952'] and parent::node()[@code='e']"/> >+--> >+ <xslo:otherwise> >+ <z:index name="Any:w Any:p"> >+ <xslo:value-of select="."/> >+ </z:index> >+ </xslo:otherwise> >+ </xslo:choose> > </xslo:template> > <xslo:template name="chopPunctuation"> > <xslo:param name="chopString"/> >-- >1.7.7.6
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 12872
:
31366
|
31367
|
31368
|
31527
|
31528
|
31529
|
32578
|
32584
|
32585
|
32586
|
32892
|
32893
|
32894