The 'update index' option allows modules to add content to be indexed with a node. This includes e.g. a node's taxonomy terms and comments.

Attached patch adds support for this to the sample implementation in the documentation.

CommentFileSizeAuthor
#1 solr-update-index_0.patch1.49 KBnedjo
solr-update-index.patch744 bytesnedjo

Comments

nedjo’s picture

StatusFileSize
new1.49 KB

Here's possibly a better approach. Instead of just appending the extra data to the node body, we instead track it as additional fields (by noting what module produced it). That way, e.g., the comments are indexed separately, as are the taxonomy terms. This introduces the ability (not implemented here, though) to search separately by these parameters.

hickory’s picture

Status: Needs review » Fixed

I see what you mean, but calling 'update index' returns the modified node itself, rather than just extra information, so I don't know that it's appropriate to add the whole thing as an extra node. Also, I think it should be up to the node type-controlling module what gets indexed, so it should call 'update index' on appropriate modules itself.

I've committed something along these lines to the example.

Anonymous’s picture

Status: Fixed » Closed (fixed)