880 indexing for CJK: creates indexes for all records, even those without 880
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
880 indexing for CJK: creates indexes for all records, even those without 880
We have added indexes in config.
For title we created the following index in
config.
id = 1001
field_class = title
name = titleproper880
label = TitleProper880
xpath =//marc:
weight = 1
format = marc21expand880
search_field = true
All the remaining values are false/null
---
Example Record with an 880/245
http://
index created in metabib.
source = 2421719
field= 1001
value = Beijing de si miao Temple of Beijing / 北京的寺庙 Temple of Beijing /
---
---
Example Record with NO 880 fields – still receives an index for TitleProper880
http://
index created in metabib.
source = 2363729
field= 1001
value = Pretty girl gone /
---
I transformed the marcxml for these two records from biblio.record_entry into the marc21expand880 version using the xsl stored internally in config.
Looking at the marc21expand880 stylesheet and the resulting files made clear the problem. The “transformed” file has all the original marc fields in it. It does produce new datafields created by the xsl template for the 880s. The new 880 nodes are given a name space of marc <marc:datafield>. However marc is the same namespace as entire file. That means when the xpath is evaluated both the original field(245) and the new <marc:datafield> node (880/245) created from the 880 are found. This can be seen in the resulting index examples shown above. The Chinese title has both the English 245 and the Chinese 880/245 for its value in its index in title_field_entry table. The English only title has a value of just the English 245, where it should have none.
I looked at modifying our index xpath to only look for those nodes created from the 880s, however there is nothing unique enough about them to separate them from the original marc fields.
I did some experimenting on our training system with the TitleProper880. Giving the transformed 880 fields a different name <marc:datafield880> and modifying the indexes to match produced the results we expected. Only the records with an 880/245 created an index in the metabib.
How can we correct this problem? Is the problem with our indexes or the internal stylesheet? Can it be corrected without modifying the internal xsl marc21expand stylesheet?
I have attached the marc21expand stylesheet extracted from xml_tranform.
Also I’ve included the original marcxml from the bib (beijing.xml pretty_
tags: | added: cleanup |