When searching in the OPAC using Elasticsearch (or OpenSearch) some facet labels are not displayed in the search results. The actual facets are displayed, but not the heading they are grouped under. The facet heading labels that are not displayed are (for the sample data in KTD): - Item types - Collections - Holding libraries - Home libraries - Languages To replicate (using koha-testing-docker (KTD)): 1. Start up KTD using Elasticsearch (or OpenSearch): ktd --es8 up (or --es7, os1, os2 - note os1 and os2 were having trouble starting up for me when I created this bug). 2. In the OPAC, search for books. 3. Note that facet heading labels are missing for these facets: - Item types - Collections - Holding libraries - Home libraries - Languages 4. Search in the staff interface, and note that facet headings are displayed correctly. 5. Change the Searchengine system preference to Zebra. 6. Search in the OPAC again for books and note that the facet heading labels are correctly displayed.
Created attachment 166031 [details] OPAC - Missing facet headings
Created attachment 166032 [details] OPAC - Zebra facet headings (no issues)
Created attachment 166083 [details] [review] Bug 36750: (35138 follow-up) Use same display code for OPAC To test: 1 - In OPAC with ES enabled do a search 2 - Note missing facet labels 3 - Apply patch 4 - They are back!
Created attachment 166084 [details] [review] Bug 36750: (35138 follow-up) Use same display code for OPAC To test: 1 - In OPAC with ES enabled do a search 2 - Note missing facet labels 3 - Apply patch 4 - They are back! Signed-off-by: David Nind <david@davidnind.com>
Thanks Nick!
There is something not quite right here. For me without the patch the labels display in the OPAC and it doesn't look like on the screenshot which seems a little odd. With the patch I see "HomeLibrary" as a label, but it should be "Home libraries" (requires DisplayLibraryFacets set to both) Maybe we need to double check the database update?
Created attachment 166187 [details] [review] Bug 36750: Fix some labels
Nick's patch looks good to me. I have found other "typos" that will cause problems with translation.
(In reply to Jonathan Druart from comment #8) > Nick's patch looks good to me. I have found other "typos" that will cause > problems with translation. What about the HomeLibrary issue I found? For me the situation worsens with the patch.
(In reply to Katrin Fischer from comment #9) > (In reply to Jonathan Druart from comment #8) > > Nick's patch looks good to me. I have found other "typos" that will cause > > problems with translation. > > What about the HomeLibrary issue I found? For me the situation worsens with > the patch. To be clear, I have "Home libraries" showing fine and all other labels are ok 2. They break WITH the patch applied.
For clarification: Turns out I somehow ended up with Zebra instead of Elasticsearch while testing. So the regression was in Zebra actually. Waiting for Joubu's Go on this now.
Created attachment 166191 [details] [review] Bug 36750: Fix some labels
Created attachment 166192 [details] [review] Bug 36750: Use the same label for Zebra
Created attachment 166193 [details] [review] Bug 36750: Fix aria-label for show more/less links Didn't manage to keep the more_less_labels because of the space in the key names
Created attachment 166194 [details] OPAC - Elasticsearch (2024-05-06) - Current facets For what it is worth, I had another look (after Jonathan's patch) and the screenshot shows what I see now. Additional things that I noticed: 1. Collections: displaying authorized value codes rather than the OPAC description. I added some OPAC descriptions in the authorized values, but it made no difference, even after reindexing. For the Elasticsearch configuration, ccode is mapped to 9528. 2. Languages: Zebra doesn't have languages shown in the facets, values look like they are coming from 041$a (I initially thought they would be coming from the LANG authorized values). 3. Item types: the odd values are coming from "bad data" - records with non-authorized values in 942$c.
yes, I reassigned it to myself because I found issues with Zebra. Should be fixed now but I really would like Nick's opinion on those follow-ups :)
Ignore my comment, these were before Jonathan's additional patches! I'll wait to sign off until Nick has had a look.
Hi David, I think having your feedback on the new patches would be very helpful in moving this forward if you can spare the time!
Nothing too much to add (Jonathan fixed the Collections facet - now displays CCODE authorized value description, if it has an OPAC description then that is displayed instead): Elasticsearch - facet labels and order:[1] - Availability - Authors - Item types - Locations - Places - Series - Topics - Collections - Holding libraries - Home libraries - Languages [4] Zebra - facet labels and order:[2] - Availability - Authors - Collections - Holding libraries[3] - Item types - Locations - Series - Places - Topics - Titles [4] [1] Elasticsearch - can configure the facet order from Administration > Catalog > Search engine configuration (Elasticsearch) > Bibliographic records > bottom of the page [2] I don't think there is a UI way to configure the facet order in Zebra (but I don't know enough about configuring either Zebra or Elasticsearch). [3] There is a Zebra only system preference to configure what is shown for home and holding libraries: DisplayLibraryFacets - default in KTD is to show facets for holding library. Other options are home library, and both home and holding library (both of these work as expected with Zebra). [4] Default KTD differences (apart from Home and holdings libraries (see [3]): - Elasticsearch has a Languages facet - Zebra has a Titles facet
Created attachment 166281 [details] [review] Bug 36750: (35138 follow-up) Use same display code for OPAC To test: 1 - In OPAC with ES enabled do a search 2 - Note missing facet labels 3 - Apply patch 4 - They are back! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166282 [details] [review] Bug 36750: Fix some labels Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166283 [details] [review] Bug 36750: Use the same label for Zebra Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166284 [details] [review] Bug 36750: Fix aria-label for show more/less links Didn't manage to keep the more_less_labels because of the space in the key names Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This all looks good to me - if David can test too and add his sign off then we can mark this PQA
(In reply to Katrin Fischer from comment #25) > I am not persuaded by the current "design" of the radiobox buttons, but > maybe we can get some help there if we ask really nicely as a follow-up? wrong bug...
Created attachment 166286 [details] [review] Bug 36750: Fix Languages vs Language
*** Bug 36803 has been marked as a duplicate of this bug. ***
Created attachment 166288 [details] [review] Bug 36750: (35138 follow-up) Use same display code for OPAC To test: 1 - In OPAC with ES enabled do a search 2 - Note missing facet labels 3 - Apply patch 4 - They are back! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166289 [details] [review] Bug 36750: Fix some labels Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166290 [details] [review] Bug 36750: Use the same label for Zebra Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166291 [details] [review] Bug 36750: Fix aria-label for show more/less links Didn't manage to keep the more_less_labels because of the space in the key names Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 166292 [details] [review] Bug 36750: Fix Languages vs Language
Fixed conflicts with bug 36396.
We still have a little issue with the labels for Zebra: They display as: * CollectionCodes * HoldingLibrary Can you please have a look?
Forget it, it just fixed itself!
Testing this myself as you can see... :)
Pushed for 24.05! Well done everyone, thank you!
I am not sure if this is related to this or another facets patch, but it seems definitely related to the facets work: t_db_dependent_Koha_SearchEngine_Elasticsearch_QueryBuilder_t.build_query tests (59) not ok 9 - homebranch not added to facets if DisplayLibraryFacets=holding ok 10 - holdingbranch added to facets if DisplayLibraryFacets=holding ok 11 - homebranch added to facets if DisplayLibraryFacets=home not ok 12 - holdingbranch not added to facets if DisplayLibraryFacets=home
(In reply to Katrin Fischer from comment #39) > I am not sure if this is related to this or another facets patch, but it > seems definitely related to the facets work: > > t_db_dependent_Koha_SearchEngine_Elasticsearch_QueryBuilder_t.build_query > tests (59) > not ok 9 - homebranch not added to facets if DisplayLibraryFacets=holding > ok 10 - holdingbranch added to facets if DisplayLibraryFacets=holding > ok 11 - homebranch added to facets if DisplayLibraryFacets=home > not ok 12 - holdingbranch not added to facets if > DisplayLibraryFacets=home See bug 35138.
Depends on Bug 35138 not in 23.11.x
This looks like a bug fix, nothing to add/edit in the manual. Please reopen with comments if not!