The highlight logged-in library in facets feature does not work with Elasticsearch. This is because facet_title_value contains an additional " (count)" information and so gives negative results in comparisons made in facets.inc (line 107).
Created attachment 168361 [details] [review] Bug 37231: (Bug 34940 follow-up) Highlight logged-in library in facets does not work with ES The highlight logged-in library in facets feature does not work with Elasticsearch. This is because facet_title_value contains an additional " (count)" information and so gives negative results in comparisons made in facets.inc (line 107). Test plan: ========== 1. Have a test installation with Elastiscsearch. 2. Set system preference 'DisplayLibraryFacets' to 'both home and holding libraries' 3. Perform a seach that will find items of your logged-in library. In KTD, search for 'branch:CPL' 4. Check the facet (home and holding libraries) of your logged-in library is not highlighted 5. Apply the patch ; restart_all. 6. Repeat p. 3. Check the facet (home and holding libraries)--you should see your logged-in branch highlighted now. Sponsored-by: Ignatianum University in Cracow
Created attachment 168407 [details] [review] Bug 37231: (Bug 34940 follow-up) Highlight logged-in library in facets does not work with ES The highlight logged-in library in facets feature does not work with Elasticsearch. This is because facet_title_value contains an additional " (count)" information and so gives negative results in comparisons made in facets.inc (line 107). Test plan: ========== 1. Have a test installation with Elastiscsearch. 2. Set system preference 'DisplayLibraryFacets' to 'both home and holding libraries' 3. Perform a seach that will find items of your logged-in library. In KTD, search for 'branch:CPL' 4. Check the facet (home and holding libraries) of your logged-in library is not highlighted 5. Apply the patch ; restart_all. 6. Repeat p. 3. Check the facet (home and holding libraries)--you should see your logged-in branch highlighted now. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Got a bit confused here, but it looks like it only works in the staff interface!
Pushed for 24.11! Well done everyone, thank you!
(In reply to Katrin Fischer from comment #3) > Got a bit confused here, but it looks like it only works in the staff > interface! This is right. The Fridolin's intention in Bug 34940 was to correct intranet-tmpl/prog/en/includes/facets.inc only. Here I just fixed what was not working for ES. If somebody wanted to extend Bug 34940 to OPAC, the current fix for ES should work as well without additional changes.
Backported to 24.05.x for upcoming 24.05.06
Pushed to 23.11.x for 23.11.11