[Koha] Creating additional indexes and adding to the facet

Katrin Fischer Katrin.Fischer.83 at web.de
Tue Feb 16 19:30:16 NZDT 2016


Hi,

some ideas: if you are working in a git installation, you have to copy
the created configuration files into your koha-dev directory in order
for them to be used by Zebra.

If you are using Zebra facets, there are some special entries at the end
of the xml files:
 969   <facet tag="100" subfields="a">
 970     <target_index>au:0</target_index>
 971   </facet>

Zebra vs. Koha facets can be switched on/off in the koha-conf.xml file.

Hope this helps,

Katrin

Am 11.02.2016 um 10:32 schrieb Serdar Gokhan:
> Hi,
> 
> I use the following procedures from
> https://wiki.koha-community.org/wiki/How_to_add_new_zebra_index and
> https://wiki.koha-community.org/wiki/Understanding_Zebra_indexing, but get
> no facet shown:
> 
> 
> /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml:
>  <index_data_field xmlns="http://www.koha-community.org/schemas/index-defs"
> tag="380" subfields="a">
>      <target_index>FormOfWork:w</target_index>
>  </index_data_field>
> 
> /etc/koha/zebradb/biblios/etc/bib1.att:
>  att 10000    FormOfWork
> 
> /etc/koha/zebradb/ccl.properties:
>  FormOfWork 1=10000
> 
> lib/C4/Koha.pm, in sub getFacets, (non-unimarc):
> {
>                 idx   => 'FormOfWork',
>                 label => 'FormOfWork',
>                 tags  => [ qw/ 380a / ],
>                 sep   => '--',
>  },
> 
> opac/htdocs/opac-tmpl/bootstrap/<LANG>/includes/opac-facets.inc, after  [%
> FOREACH facets_loo IN facets_loop %]:
>   [% IF facets_loo.type_label_FormOfWork %]<h5 id="facet-FormOfWork">Form
> of work</h5>[% END %]
> 
> lib/C4/Search.pm, in sub getIndexesn my @indexes added:
>  'FormOfWork',
> 
> Running:
> xsltproc /etc/koha/zebradb/xsl/koha-indexdefs-to-zebra.xsl
> /etc/koha/zebradb/marc_defs/marc21/biblios/    biblio-koha-indexdefs.xml
>> /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
> koha-rebuild-zebra -b -f -v library
> koha-restart-zebra
> 
> Example MARC21 record:
>  380$a Play
> 
> What am I doing wrong?
> 
> Thanks,
> 
> Dit e-mailbericht is verzonden vanaf een virusvrije computer die wordt
> beschermd door Avast.
> www.avast.com <https://www.avast.com/sig-email>
> <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
> 



More information about the Koha mailing list