We use apache solr on a website. If a community tag was added by the ajax call, the node was not reindexed. I tracked down the problem.

In the community_tag.module in the function community_tags_taxonomy_node_save() the is a call for updating the search index:

search_touch_node().

This function is only a helper function and this is not the desired way to do this because the apache solr index won't be updated.

The correct way is calling the nodeapi with the update parameter.

I created a patch, that is implemented on our live site:

CommentFileSizeAuthor
community_tags-6.x-1.0-beta3.txt458 bytesayalon

Comments

chaps2’s picture

Don't use the patch in #1. When saving the node - i.e. from the node edit tab - an endless loop may be invoked.

@ayalon - thanks for the patch but are you really using this on your live site? I can see that it will work for the ctags ajax form submission but from node edit page community_tags_nodapi('update'...) is invoked which calls community_tags_taxonomy_node_save() which in your patch then invokes community_tags_nodapi('update'...) again....

chaps2’s picture

Version: 6.x-1.0-beta3 » 6.x-2.x-dev
Category: bug » feature

I'm marking this as a feature request and moving to 2.x. I don't see it as a bug i.e. shouldn't the solr integration module support search_touch_node()?

To implement this properly will require a rework of community_tags_taxonomy_node_save() to ensure that it is always included in the hook_nodeapi('update') workflow and does not need to invoke it.

chaps2’s picture

Version: 6.x-2.x-dev » 6.x-1.0-beta4
Status: Active » Fixed

Fixed in 6.x-1.0-beta4. All tag add/remove operations that result in a term being added or removed from the node now call node_save().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.