The Taxonomy Entity Index module maintains a normalized index of all terms associated with a specific entity and revision. The core {taxonomy_index} table only maintains its data for published nodes. This module maintains its data for all entity types (regardless of published or not) and also indexed by revision.

This module will be ported to Drupal 8 and the plan is to also possibly move this feature into core for Drupal 9.

Core issues:
#962664: Taxonomy Index for unpublished entities
#1040786: Include entities in taxonomy_index
#610076: Add a primary key to the {taxonomy_index} table and prevent duplicates being inserted

Current features:
[entity-type:terms] array token if Token is enabled.
Views integration: use Taxonomy Entity Index for defining relationships or filters in Views.
Batch Re-Indexing through the UI or drush tei-rebuild

If you are installing this module into an existing site, visit admin/config/system/taxonomy-entity-index to rebuild the Taxonomy Entity Index.

Project Information