Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bulk Operations (VBO) 4.4.8 Minor update available for module views_bulk_operations (4.4.8). Release: Commerce Authorize.Net 2.0.0 Major update available for module commerce_authnet (2.0.0). Usage Milestone: Easy Breadcrumb Module easy_breadcrumb crossed 100,000 active installs. Release: SDC Components 2.0.3 Minor update available for module sdc_components (2.0.3). Release: Commerce ML Starter 8.x-1.94 Minor update available for module cmlstarter (8.x-1.94). Release: Field Label Visibility (an intuitive approach to editing node forms) 1.0.3 Minor update available for module field_label_visibility (1.0.3). Release: DruxtJS 1.3.1 Minor update available for module druxt (1.3.1). Release: Monobank payment API 1.0.4 Minor update available for module monobank (1.0.4). Release: Personified 1.0.4 Minor update available for module personified (1.0.4). Module Revived: Fleetview client 1.1.2 Module fleetview_client updated after 16 months of inactivity (1.1.2).

This module indexes specific HTML element attributes, text content, counts, and URL hosts as searchable fields. It allows each matching HTML tag to be indexed as its own item, enabling detailed searching and faceting on elements like iframe sources or image alt text, and URL domains.

Indexes HTML element attributes, text, counts, and URL hosts as Search API fields. It can also expose each matching tag as its own indexed item (one Solr document per occurrence).

Use this when you need attributes that a text format may keep or strip (for example iframe src or img alt), or when you want to facet on the host or registrable domain of those URLs.

Features

Basic function. Render parent entities, find configured HTML tags, and store attribute values as Search API fields. Multi-value fields stay aligned by document order even when Solr would skip empty strings or collapse duplicates.

What enabling it adds.

  • An HTML element datasource. One indexed item per matching tag in the rendered parent. Configure entity types, bundles, tags, view mode, and render role.
  • An HTML attributes processor. Add fields for an attribute, a tag count, textContent, or inner HTML. Enable the processor before using Add fields.
  • URL host and URL root domain processors. Derive the host or unique eTLD+1 from a URL field after attributes are filled.

When to use it. Use this when Search API's rendered HTML field is too coarse, or when you need one document per embed or link for Views and facets.

Example use cases.

  • Index every iframe URL on a page and facet by host or root domain.
  • Keep img src and alt aligned by position after Solr storage.
  • Store paragraph text without descendant tags as extra items.

Post-Installation

There is no settings page. Configure the index.

  1. Enable Search API HTML Element.
  2. Add the HTML element datasource, or keep an entity datasource and enable the HTML attributes processor with a rendered HTML source field.
  3. Enable the processor, then add attribute, count, text, or URL fields.
  4. Enable URL host / URL root domain after the source URL field is filled.

Check the text format allowed tags and attributes. A stripped attribute indexes as empty with no error.

Additional Requirements

  • Drupal 11.4 or later, or Drupal 12
  • PHP 8.3 or later (Drupal 12 sites already require PHP 8.5)
  • Search API

Similar projects

  • Search API HTML Element Filter strips selected tags from rendered HTML before indexing. This module extracts attributes and can index each tag as its own item.
  • Indexing HTML Attributes is an older Apache Solr / Drupal 7 module with the same idea.
  • Search API's own Rendered HTML output field stores the full markup. This module parses that markup (or occurrence HTML) into fields.

Supporting this Module

File bug reports and feature requests in the issue queue.

Community Documentation

See the README in the Git repository for datasource setup, encoding, and processor order.

This module is technically supported by Big Blue Door through the work completed in collaboration with Hackney Council who have directly funded this work

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Sep 2026
Latest release
1 day ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0-beta2 Pre-release 11 Sep 8, 2026
1.0.0-beta1 Pre-release 11 Sep 8, 2026
1.0.x-dev Dev 11 Sep 8, 2026