Bug 31191

Summary: Specify FacetLabelTruncationLength is only for Zebra
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, lucas, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31226
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Caroline Cyr La Rose Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/576
Text to go in the release notes:
This enhancement adds a note to the FacetLabelTruncationLength system preference description that it only works with Zebra. When using ElasticSearch, facets are displayed in full.
Version(s) released in:
22.11.00
Attachments: Screenshot of facets with Zebra
Screenshot of facets with Elasticsearch
Bug 31191: Specify FacetLabelTruncationLength is only for Zebra
Bug 31191: Specify FacetLabelTruncationLength is only for Zebra

Description Caroline Cyr La Rose 2022-07-19 19:13:46 UTC
When using ElasticSearch, the FacetLabelTruncationLength system preference doesn't apply. I don't know if it's a bug or by design. Maybe it should be indicated in the syspref description that it only works with Zebra?

To test:
1) Change the searchengine syspref to Zebra
2) Reindex
3) Do a search
4) Check the facets
   --> The longer ones should be truncated to 20 characters
5) Change the seachengin syspref to Elasticsearch
6) Redo steps 2-4
   --> The longer facets are displayed in full
Comment 1 Caroline Cyr La Rose 2022-07-19 19:15:12 UTC
Created attachment 137885 [details]
Screenshot of facets with Zebra

This is a screenshot of facets with Zebra. Note that the longer ones are truncated with an ellipsis, e.g. "Association for Scot..."
Comment 2 Caroline Cyr La Rose 2022-07-19 19:16:14 UTC
Created attachment 137886 [details]
Screenshot of facets with Elasticsearch

This is a screenshot of facets with Elasticsearch. Note that the longer ones are there in full, e.g. "Association for Scottish Literary Studies"
Comment 3 Caroline Cyr La Rose 2022-07-19 19:18:06 UTC
In my test, I did not change the FacetLabelTruncationLength system preference when I changed search engines. 

I also did not specify staff interface or OPAC, but it does the same thing in both interfaces.
Comment 4 Caroline Cyr La Rose 2022-07-19 19:25:03 UTC
Created attachment 137887 [details] [review]
Bug 31191: Specify FacetLabelTruncationLength is only for Zebra

This patch adds a note in the description of FacetLabelTruncationLength
that it only works with Zebra.

To test:
0) Apply patch
1) Go to Administration > Global system preference > Searching
preferences
2) Search for FacetLabelTruncationLength
3) Read the description, make sure it indicates that is requires Zebra
Comment 5 Caroline Cyr La Rose 2022-07-19 19:25:48 UTC
I changed the .pref file, I'm not sure if that's where it's changed or if it's the only place... Let me know.
Comment 6 Katrin Fischer 2022-07-24 21:25:45 UTC
Created attachment 138066 [details] [review]
Bug 31191: Specify FacetLabelTruncationLength is only for Zebra

This patch adds a note in the description of FacetLabelTruncationLength
that it only works with Zebra.

To test:
0) Apply patch
1) Go to Administration > Global system preference > Searching
preferences
2) Search for FacetLabelTruncationLength
3) Read the description, make sure it indicates that is requires Zebra

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2022-07-24 21:26:49 UTC
String patch - passing QA too.
Comment 8 Tomás Cohen Arazi 2022-07-25 14:33:39 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 9 Lucas Gass 2022-09-02 19:30:39 UTC
Enhancement will not be backported to 22.05.x series.
Comment 10 Martin Renvoize 2022-09-16 13:02:52 UTC
I merged the docs update.. thanks Caroline