Similarly to Bug 18213, it'd be nice to add publication date facet. It seems to work quite nicely, so why not? Our librarians say it's super useful. I've seen one library implement it in their fork, the only difference is that they sort the publication year facet in reverse incremental order (so from newest to oldest year instead of oldest to newest), but I think this would require an explicit check in the code, and I wasn't sure if that'd be fine... To test, one should have Elasticsearch enabled and re-generate the mappings from file and reindex as described in Bug 18213. Then confirm that the facet is visible and working: - in OPAC search - in intranet search - in intranet settings, under Elasticsearch mapping settings page, biblio tab, publication year facet should be visible at the bottom where you set facet order, with correct label; you should be able to change the order normally as expected
Created attachment 163976 [details] [review] 0001-Bug-36437-Add-publication-year-facet-to-Elasticsearc.patch
Hey, did you see bug 35138?
Oh, I didn't. Honestly if they want to make facets configurable in the UI instead of hardcoding them in several places, then that's only for the better. Then that'd obsolete this bug and afterwards we could only argue for including the publication year on by default perhaps... (whether as this bug or by Bug 10734 and marking that one as solved and this one as not applying...)
It could still be added to the default but in my opinion the patch should be written on top of bug 35138.