Bug 36398

Summary: Handle "specials" authorised value category for ES facets
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 36396, 36399    
Bug Blocks:    

Description Jonathan Druart 2024-03-22 10:02:30 UTC
It's currently not possible to link a special authorised value category to an ES facet: library, itemtype, location, etc.

This is because how (badly) we fetch/cache the authorised values. Improvements must be done in this area before supporting them here.
Comment 1 Jonathan Druart 2024-03-28 07:29:08 UTC
It's actually branches (homebranch, holdingbranch), itemtype and cn_source. And there is a "special special" that is "language/ln".

However some existing hardcoded facets should use the link: Location, Collections.

Location is built in _convert_facets (Koha::SearchEngine::Elasticsearch::Search) and Collections in the include file: AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value )
Absolutely not consistent!