Greetings,

I'm looking for clarification on the breadth of searching capability in 4.7's core Search module. My understanding was that much of the functionality of SQL/Trip Search had been integrated already so that, among other things, one could search on a Taxonomy term and get nodes that had been tagged with that term. Indeed, the Advanced Search under 4.7 seems to want to do this: if I select a taxonomy term along with a search string, the taxonomy term is interpreted and added to the search string.

My question is, is the intent to allow users to type in the actual taxonomy term and search for that against the full text and taxonomy terms? I read the documentation for SQL Search to say that it did this and that Drupal 4.7's intent to include such features had effectively ended the need for SQL Search. Maybe I have misconfigured my 4.7 installation, but I cannot get this degree of searching to work, nor have I been able to find a roadmap that describes exactly how core Search is intended to work in 4.7.

Is taxonomy term searching only going to work as a restrictor in conjunction with a search term, or will a user be able to submit a string that will be searched for at both the taxonomy and full text level? More importantly (and embarrassingly), is this latter feature already available and I have just misconfigured things?

Many thanks in advance,

Mark

Comments

datura-1’s picture

I had a similar issue...in my system, my custom nodes (defined in my module) must be assigned a category + 0 or more tags.

Unfortunately, these nodes were not appearing when users performed a search on a taxonomy term.

I discovered the 'update index' hook and now I can add the taxonomy terms for my nodes to the search index. Now my nodes show up whenever anyone searches for a category or tag that has been assigned to my node.

function hook_nodeapi(&$node, $op, $arg = 0) {
   switch ($op) {
     case 'update index':
       $text = '';
       if($node->taxonomy) {
         foreach($node->taxonomy as $tax) {
           $text .= $tax->name . ' ';
         }
       }
       return $text;
   }
 }
mweixel’s picture

Datura,

Exactly what I need. Where exactly did you implement the snippet that you posted? In your module or did you modify a core module like search or taxonomy?

Thanks in advance,

Mark

datura-1’s picture

Implemented in my module.

The function is actually named modulename_nodeapi().