[Koha-bugs] [Bug 9352] Zebra indexes useless subfields in UNIMARC 7XX

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 5 10:49:43 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9352

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31380|0                           |1
        is obsolete|                            |

--- Comment #54 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 31387
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31387&action=edit
[SIGNED OFF] Bug 9352: Add a new XSLT template for indexing goup of subfields
as a whole

This patch adds a new template in koha-indexdefs-to-zebra.xsl in order to index
a specific goup of subfields as a whole.
It can be used for indexing as a "phrase" a string resulting from the
concatenation of some indexes (with a space between them)
To use this new template, use the new "index_group_of_subfields" element in
biblio-koha-indexdefs.xml, in the same way you used index_subfields

Ex : to index the concatenation of "$a $b $d $g" subfields of 700 UNIMARC field
in Author:p
  <index_group_of_subfields
xmlns="http://www.koha-community.org/schemas/index-defs" tag="700"
subfields="abdg">
    <target_index>Author:p</target_index>
  </index_group_of_subfields>

This patch also change the biblio-koha-indexdefs.xml and
biblio-zebra-indexdefs.xsl for UNIMARC, in order to use this new template for
700-712 fields
For 700 and 710, it also indexes in "Author:s" (used for sorting) the
concatenation of subfields instead of only the $a subfield

To test : in a DOM UNIMARC Koha, apply all the patches, copy the modified files
in your Zebra configuration directory, rebuild zebra, and make some tests

Everything should be the same as when only the first 2 patches were applied,
EXCEPT this behavior:
- create a record with 700$aDoe$bJohn (and nothing in 200$f or $g)
- Go in Advanced Search, and select the "Author as phrase" index
- with only the first 2 patches, you will have 0 result if you enter "Doe John"
or "Doe John"
- with the 3 patches, you will have 1 result if you enter "Doe John" or "Doe
John"
- same kind of test for 710 field
- the logic is the same for 701, 702,711, 712. So, no need to test
- make some searches and test the sorting of your results by author name
("Author A-Z" and "Author Z-A"). The complete name of main author (700 and 710)
sould be used for sorting the results, instead of only $&

Note that this it better to test it in advanced search, because the behavior of
"au:" CCL index in simple search is maybe bugged
(it searches the phrase index, while it should probably searches the word
index)

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list