tags:

views:

285

answers:

1

I only want certain nodes to be indexed. The "search config" module claims to have this capability, but it doesn't work. So, how do I either edit the node module to only index certain nodes, or better yet, impliment a module that can do this for me?

+1  A: 

This is a long standing feature request, but it looks like it has already been pushed to at least Drupal 8 :/

You can find some workaround suggestions in the feature request discussion linked above, but the 'standard' approach used by the search config module is described here. It does not prevent the nodes from being indexed, but manipulates the search queries to ignore certain entries (e.g. node types) so that they won't show up on the search result pages.

As there is no obviously better solution at the moment (afaik), I agree with ceejayoz´ comment that you should first check why the search config module does not work for you before embarking on custom coding your own solution.

If you have to resort to editing the node module itself, node_update_index() would be the place to start.

Henrik Opel