Problem/Motivation
We are in the process of switching our site's facets from blocks to Better Exposed Filters, which is a very welcome update. However, we are missing the ability to add a missing result with a customizable label.
Description of the functionality in the block-based format: Show missing - Add a facet item that counts and selects all search results which match the current query but do not belong to any of the facet items. Also has the ability to add "Label of missing items"
Our site is an image database, and in some contexts, browse-ability relies on a missing result. For example, to filter thousands of images to differentiate a general image of a building from an image with more specific details. We also rely on it for internal quality control views, to quite literally find missing items.
Many thanks to all
* Originally posted in BEF (#3535211: Add ability to show missing items in facets), was suggested to post here instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | facets-3544882-4-MR354.patch | 6.18 KB | fengtan |
| #4 | facets-3544882-show-missing.png | 165.98 KB | fengtan |
Issue fork facets-3544882
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
fengtanI also needed this functionality and came up with MR !354.
The MR adds a new checkbox
Show missingto views filters, as well as a text fieldLabel of missing items(this is similar to the legacy facets system at/search/admin/config/search/facets):The label does not seem to actually show up (instead I get an exclamation mark
!) but that was also the case with the legacy facets system so maybe we can deal with that in a separate issue.The MR makes phpunit fail with errors on
Drupal\Tests\facets\Kernel\FacetManager\DefaultFacetManagerTest(#673678). I can't reproduce these failures locally (drupal 10.5, search_api 1.40.0), and the errors reported do not seem related to this changeset, so I am going to dare to move this issue toNeeds Review.Attached is a also patch version of the MR for convenience.
Comment #5
prudloff commentedI opened a separate issue for the failing DefaultFacetManagerTest: #3579256: Failing DefaultFacetManagerTest
Comment #8
mkalkbrenner