Conflict between Zebra registers and C4::Search::_build_weighted_query()
Hi all, I noticed that "Corporate name" doesn't work in the advanced search on the staff client when QueryWeightFields is enabled. The reason is that QueryWeightFields rewrites the query to use the phrase register and "Corporate name" is only indexed in the word register. When the special attribute 14=1 isn't used in the query, this causes Zebra to fail the query with a 114 unsupported attribute error. Now one solution is to add "Corporate name" to the phrase register, but I imagine C4::Search::_build_weighted_query() must be causing this same problem to other queries where an index doesn't exist in the phrase register. I don't know what the best solution is here. I think we all know C4::Search is a terrifying mess of horror, so the easiest solution seems to be to add "Corporate name" to the phrase register. But C4::Search will never change unless we change it. That said, maybe this kind of issue doesn't matter as much anymore in a world where we're trying to move to Elasticsearch? I'm open to thoughts, opinions, and questions. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21286 I'm thinking it might be worthwhile too to report Zebra errors in the Apache logs and maybe surface them on the staff client as well. I'm sure we're all familiar with Koha saying "No results found" when really under the surface Zebra is actually generating errors. I might raise an issue for that and do a quick POC and flesh it out more at Kohacon or something. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595
participants (1)
-
David Cook