In UNIMARC DOM config file (biblio-zebra-indexdefs.xsl), we have this line <z:index name="item # just to index every subfield:w"> I suppose it is not good... We should remove the comments M. Saby
Created attachment 17495 [details] [review] [PATCH] Bug 10037 : item index is broken in UNIMARC DOM indexing In UNIMARC DOM indexing, "item" index is working only for subfields of 995 field mapped with specific indexes, and also in index (ex : $a, $b...) It is not working for the other subfields (ex : $g), because a comment from record.abs was integrated in DOM config files. This patch removes the comment. To test, in a DOM UNIMARC environment : 1) in a item, write some value "Test10037" in 995$g 2) search for this value in simple search, this way : item=Test10037 => you should have no results 3) apply the patch. if necessary, copy the modified src/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml and src/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl into the /etc/... directory in your main Koha directory 4) reindex zebra biblios 5) do the same search as 2) => you should have one result M. Saby
Created attachment 21061 [details] [review] [SIGNED-OF] Bug 10037 : item index is broken in UNIMARC DOM indexing In UNIMARC DOM indexing, "item" index is working only for subfields of 995 field mapped with specific indexes, and also in index (ex : $a, $b...) It is not working for the other subfields (ex : $g), because a comment from record.abs was integrated in DOM config files. This patch removes the comment. To test, in a DOM UNIMARC environment : 1) in a item, write some value "Test10037" in 995$g 2) search for this value in simple search, this way : item=Test10037 => you should have no results 3) apply the patch. if necessary, copy the modified src/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml and src/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl into the /etc/... directory in your main Koha directory 4) reindex zebra biblios 5) do the same search as 2) => you should have one result Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. Test NOTE: default UNIMARC framework don't have 995g, so I must add it first. 1) Added test string to 995b on some record 2) Reindex and search as indicated, no results 3) cp files to destination 4) reindex 5) search and result ok !
Bit stuck on testing here as I have some errors on running a full reindex: REINDEXING zebra ==================== 00:34:32-07/10 zebraidx(27269) [warn] isamb: Inconsistent register (2) zebraidx: isamb.c:1102: insert_leaf: Assertion `*lookahead_mode' failed. 00:34:33-07/10 zebraidx(27279) [warn] previous transaction didn't reach commit I will have to investigate some more.
Hello That's maybe related with other errors in the config file. Mathieu
By the way it is probably not a good thing to index all subfields of 995 in the same item index, because some subfields contains data useless to index (as internal notes...). But it could be the object of an other patch after this one is pushed. Mathieu
QA comment: The patch works as expected and the behavior is consistent to me. Marked as Passed QA.
Created attachment 21940 [details] [review] Bug 10037 : item index is broken in UNIMARC DOM indexing In UNIMARC DOM indexing, "item" index is working only for subfields of 995 field mapped with specific indexes, and also in index (ex : $a, $b...) It is not working for the other subfields (ex : $g), because a comment from record.abs was integrated in DOM config files. This patch removes the comment. To test, in a DOM UNIMARC environment : 1) in a item, write some value "Test10037" in 995$g 2) search for this value in simple search, this way : item=Test10037 => you should have no results 3) apply the patch. if necessary, copy the modified src/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml and src/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl into the /etc/... directory in your main Koha directory 4) reindex zebra biblios 5) do the same search as 2) => you should have one result Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. Test NOTE: default UNIMARC framework don't have 995g, so I must add it first. 1) Added test string to 995b on some record 2) Reindex and search as indicated, no results 3) cp files to destination 4) reindex 5) search and result ok ! Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
(In reply to Katrin Fischer from comment #3) > Bit stuck on testing here as I have some errors on running a full reindex: > REINDEXING zebra > ==================== > 00:34:32-07/10 zebraidx(27269) [warn] isamb: Inconsistent register (2) > zebraidx: isamb.c:1102: insert_leaf: Assertion `*lookahead_mode' failed. > 00:34:33-07/10 zebraidx(27279) [warn] previous transaction didn't reach > commit > > I will have to investigate some more. Note: I hadn't these errors on reindexing.
It's very likely my Zebra UNIMARC configuration was problematic, as I had tested other patches before. Thx Jonathan!
Anyway, the current code was obviously wrong ;-) "<target_index>item # just to index every subfield:w</target_index>" Mathieu
Pushed to master along with a regression test. Thanks, Mathieu!