Closed rlskoeser closed 6 years ago
More details from the Winthrop example. This is where filters are given a tag so they can be excluded: https://github.com/Princeton-CDH/winthrop-django/blob/develop/winthrop/books/views.py#L120-L125
And here is where we tell solr to exclude that tag: https://github.com/Princeton-CDH/winthrop-django/blob/develop/winthrop/books/views.py#L127-L133
Tested library, references, and interventions page. Counts within each facet are now accurate and match the filtered results that display. Also working perfectly in combination - filtering by subject gives different author counts, selecting authors gives the correct count for each author independently.
There's a Solr option to tell it to ignore a particular facet when generating counts. See https://github.com/Princeton-CDH/winthrop-django/blob/develop/winthrop/books/views.py#L127-L134 for how I implemented this for the Winthrop books search.
Applies to library, references, and interventions.