Media Node Search Exclusion
This module automatically hides nodes from search results if they reference media that has been excluded from search. It synchronizes the exclusion status between media entities and the nodes that contain them, ensuring consistent search indexing.
Media Node Search Exclusion provides automatic propagation of Search API exclusion settings from media entities to referencing nodes.
When a media entity is marked as excluded from search, Drupal does not automatically exclude nodes that reference that media. This can lead to inconsistent search indexing where content remains searchable even though one or more referenced media items should be hidden from search results.
This module solves that problem by synchronizing media exclusion status with referencing nodes according to configurable rules.
Features
- Automatically propagates media search exclusion status to referencing nodes.
- Configurable media exclusion field.
- Support for configurable media bundles.
- Multiple exclusion strategies:
- Exclude node when any referenced media is excluded.
- Exclude node only when all referenced media are excluded.
- Extensible architecture for custom exclusion logic.
- Queue-based processing for efficient bulk updates.
- Automatic updates when media exclusion status changes.
- Search API integration.
- Administrative configuration interface.
- Administrative status indicators and UI enhancements.
- Drupal 10.6 and Drupal 11 support.
Typical Use Cases
- Prevent content from appearing in search results when protected or restricted media are referenced.
- Ensure Search API indexes remain consistent with media visibility rules.
- Implement editorial workflows where media exclusion status controls the discoverability of related content.
- Support compliance and governance requirements for searchable content.
Architecture
The module uses dedicated services to resolve media exclusion status and determine whether referencing nodes should also be excluded. Updates are processed asynchronously through Drupal queues when appropriate, allowing the module to scale on content-heavy websites.
Requirements
- Drupal 10.6 or later
- Drupal 11
- Search API
- A boolean field used to indicate exclusion status on media entities