Taxonomy indexing

Same name in other branches
  1. 7.x modules/taxonomy/taxonomy.module \taxonomy_index
  2. 9 core/modules/taxonomy/taxonomy.module \taxonomy_index
  3. 10 core/modules/taxonomy/taxonomy.module \taxonomy_index
  4. 11.x core/modules/taxonomy/taxonomy.module \taxonomy_index

Functions to maintain taxonomy indexing.

Taxonomy uses default field storage to store canonical relationships between terms and fieldable entities. However its most common use case requires listing all content associated with a term or group of terms sorted by creation date. To avoid slow queries due to joining across multiple node and field tables with various conditions and order by criteria, we maintain a denormalized table with all relationships between terms, published nodes and common sort criteria such as status, sticky and created. When using other field storage engines or alternative methods of denormalizing this data you should set the taxonomy.settings:maintain_index_table to '0' to avoid unnecessary writes in SQL.

File

core/modules/taxonomy/taxonomy.module, line 497

Functions

Title Sort descending File name Summary
taxonomy_build_node_index core/modules/taxonomy/taxonomy.module Builds and inserts taxonomy index entries for a given node.
taxonomy_delete_node_index core/modules/taxonomy/taxonomy.module Deletes taxonomy index entries for a given node.
taxonomy_node_insert core/modules/taxonomy/taxonomy.module Implements hook_ENTITY_TYPE_insert() for node entities.
taxonomy_node_predelete core/modules/taxonomy/taxonomy.module Implements hook_ENTITY_TYPE_predelete() for node entities.
taxonomy_node_update core/modules/taxonomy/taxonomy.module Implements hook_ENTITY_TYPE_update() for node entities.
taxonomy_taxonomy_term_delete core/modules/taxonomy/taxonomy.module Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.