indexing Taxonomy functions maintaining {taxonomy_index}.

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 sticky and created. This is used as a lookup table by taxonomy_select_nodes(). When using other field storage engines or alternative methods of denormalizing this data you should set the variable 'taxonomy_maintain_index_table' to FALSE to avoid unnecessary writes in SQL.

Functions

NameLocationDescription
taxonomy_field_insertmodules/taxonomy/taxonomy.moduleImplements hook_field_insert().
taxonomy_field_updatemodules/taxonomy/taxonomy.moduleImplements hook_field_update().
taxonomy_node_deletemodules/taxonomy/taxonomy.moduleImplements hook_node_delete().
taxonomy_taxonomy_term_deletemodules/taxonomy/taxonomy.moduleImplements hook_taxonomy_term_delete().
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.