Drupal V5.2
Synonyms.module

Would you please consider adding the / a Synonyms.module to Core.

below is the code I believe that should work - found it at http://drupal.org/node/83027

<?php
function synonyms_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  if ($op == 'update index') {
    $text = '';
//---------------------------
    $getTerms = taxonomy_node_get_terms($node->nid);
    foreach($getTerms as $nodeTerm) {
        $text .= ' '. $nodeTerm->name .' ';
        $childSynonyms = taxonomy_get_synonyms($nodeTerm->tid);
        foreach($childSynonyms as $childSynonym){
            $text .= $childSynonym .' ';
        }
        $parents = taxonomy_get_parents($nodeTerm->tid);
        foreach($parents as $parent) {
            $text .= ' '. $parent->name .' ';
            $synonyms = taxonomy_get_synonyms($parent->tid);
            foreach($synonyms as $synonym){
                $text .= $synonym .' ';
            }
        }
    }
//-----------------
    return $text;
  }
}
?>

thank you for considering. It would be very useful if Term Synonyms were searchable by Core.

Thank you for considering

Comments

marcingy’s picture

Version: 5.x-dev » 8.x-dev

Features go to head

marcingy’s picture

Status: Active » Closed (won't fix)

Synonyms on terms are no longer a feature in core.