Found by Jonathan with some hints from koha-qa: duplicate key is language: 647 language: 648 bib1_mapping: 649 biblioserver: 650 1: 54 651 enabled: 1 652 index: language 653 aliases: 654 - language 655 - ln 656 label: Language 657 language: 658 bib1_mapping: 659 biblioserver: 660 1: 1095 661 enabled: 1 662 aliases: 663 - language-original 664 index: language-original 665 label: Language of original
Created attachment 24746 [details] [review] Bug 11619: Duplicate key in QueryParser config Corrects a double entry for language in yaml file. Language should have been language-original. Test plan: Copy changes in yaml file to your zebra folder. Reindex, or change a few records and update zebra. Search something with index language-original.
Created attachment 24747 [details] [review] Bug 11619: Duplicate key in QueryParser config Corrects a double entry for language in yaml file. Language should have been language-original. Test plan: Apply this patch on top of report 10544 (esp. third patch). Actually quite hard to test if the record.abs does not contain an index for languge of original under GRS1 :) What should be resolved is the output of koha-qa.pl. Run the qa script and verify if there are no yaml warnings anymore.
Comment on attachment 24747 [details] [review] Bug 11619: Duplicate key in QueryParser config Still yaml warnings..
I saw some 'suspect' lines around author too. But I do not seem to get rid of the YAML warnings from koha-qa.pl I am leaving this to the experts for now :)
(In reply to M. de Rooy from comment #4) > I saw some 'suspect' lines around author too. > But I do not seem to get rid of the YAML warnings from koha-qa.pl > I am leaving this to the experts for now :) I think your first patch is right. The warning from koha-qa is normal. The tests are done before the patch AND after the patch. The warnings only appears 1 time, so before applying the patch. After the patch, it does not appear anymore.
Comment on attachment 24746 [details] [review] Bug 11619: Duplicate key in QueryParser config OK I will obsolete this one.
This test plan is nonsense ('stupid') by the way :)
Created attachment 24752 [details] [review] Bug 11619: Duplicate key in QueryParser config Corrects a double entry for language in yaml file. Language should have been language-original. Test plan: Copy changes in yaml file to your zebra folder. Reindex, or change a few records and update zebra. Search something with index language-original. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I have problems in getting the search to work: Tested with MARC21: - Applied patch and copied file - Cataloged record Language-original = 041$h - Activated QueryParser - Waited for Zebra to reindex my newly added record - Searched for the unique content of 041$h as keyword search > Record was found - Searched for language-original:<041$h> > Record was not found I have no success in using the index explicitly.
(In reply to Katrin Fischer from comment #9) > I have problems in getting the search to work: > > Tested with MARC21: > - Applied patch and copied file > - Cataloged record Language-original = 041$h > - Activated QueryParser > - Waited for Zebra to reindex my newly added record > - Searched for the unique content of 041$h as keyword search > > Record was found > - Searched for language-original:<041$h> > > Record was not found > > I have no success in using the index explicitly. Thanks for testing, Katrin. I have to admit that my test plan should be reworded (see comment 7). Will do that in a minute. Sorry for any confusion about that.. Note that this report is about fixing the QueryParser config and it is not about searching on language-original. As long as this specific index is not in the field set of C4::Search::getIndexes, you will have no results (without QueryParser). But that is true for many more indexes in record.abs. Just mentioning a few indexes with the same behavior from the first few control fields: Microform-generation, Identifier-standard, BNB-card-number, BGF-number, Number-db, Number-natl-biblio, etc. So I feel that since this fixes QP, it should not be a reason to fail this patch.
Created attachment 24996 [details] [review] Bug 11619: Duplicate key in QueryParser config Corrects a double entry for language in yaml file. Language should have been language-original. Test plan: Check that you have language-original in your zebra install. Specifically, this index should cover MARC21 041$h. Enable QueryParser and search for a record with this index. Note that this patch does not enable searching on this index without QueryParser. This is true for many more indexes in record.abs that are not included in the getIndexes routine. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Hi Jonathan, I understand that we have to list the index in Search.pm when not using the QueryParser. But now I am more confused as to why it didn't work in my test?
(In reply to Katrin Fischer from comment #12) > Hi Jonathan, I understand that we have to list the index in Search.pm when > not using the QueryParser. But now I am more confused as to why it didn't > work in my test? Katrin, I retested. If I enable QP and search on the index, I find the record with the search term in 041$h. If I disable QP, I do not find it. So please retest.
Can you add the search term/query you used?
(In reply to Katrin Fischer from comment #14) > Can you add the search term/query you used? I just simply added dut in 041$h and search for language-original: dut
Hm weird, I will retest. Jonathan, did you make any changes to the new patch?
(In reply to Katrin Fischer from comment #16) > Hm weird, I will retest. Jonathan, did you make any changes to the new patch? No, I always mention when I amend a patch.
(In reply to Katrin Fischer from comment #16) > Hm weird, I will retest. Jonathan, did you make any changes to the new patch? Please do not forget to copy the queryparser.yaml to your zebra install. You could restart Zebra but I do not think that it was necessary. Edit a record after that and search..
It still doesn't work in my test installation: - Checked that the file was copied correctly - Checked my koha-conf.xml for the QueryParser line. <queryparser_config>/home/katrin/koha-dev/etc/searchengine/queryparser.yaml</queryparser_config> - Checked QueryParser is activated. - Keyword search finds my 041$h result. - language-original:dedede doesn't. - Changed the record to have 'dut' instead. - Reindexed with -z - Keyword search finds dut. - language-original:dut gives no result. - No errors in my koha-opac-error_log. Marcel, does the space make a difference for you? language-original: dut vs. language-original:dut?
*sigh* outdated index configuration... works alright now :)
Created attachment 25016 [details] [review] [PASSED QA] Bug 11619: Duplicate key in QueryParser config Corrects a double entry for language in yaml file. Language should have been language-original. Test plan: Check that you have language-original in your zebra install. Specifically, this index should cover MARC21 041$h. Enable QueryParser and search for a record with this index. Note that this patch does not enable searching on this index without QueryParser. This is true for many more indexes in record.abs that are not included in the getIndexes routine. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described - make sure you are testing with a current indexing configuration.
(In reply to Katrin Fischer from comment #20) > *sigh* outdated index configuration... works alright now :) Thanks for your perseverance :)
Pushed to master, along with a follow-up fixing a test case that the main patch broke. Thanks, Marcel!
(In reply to Galen Charlton from comment #23) > Pushed to master, along with a follow-up fixing a test case that the main > patch broke. Thanks, Galen. I remove the non-mandatory dependency for 10544. It can also be applied on top of this..
Pushed to 3.14.x, will be in 3.14.06