1

I have a Drupal 6 site with an Apache Solr search index. I'm trying to create a block that displays 'related content', much like Stack Exchange sites have 'related' in the sidebar of questions. The modules Apachesolr_views seems like a good candidate, but it's current development status and issue queue is less than inviting. Does anyone have suggestions of a straightforward way to implement this?

1
  • if coding is an option on your end, why not add a hook_apachesolr_update_index to add a new index term for related contents' node id based on your related nodes logic (ex. sharing same taxonomy term or having same author etc.) and in your search results fetch the same if necessary with hook_apachesolr_modify_query with custom logic to show node title and teaser or whatever the display demands using the node's id Aug 28, 2012 at 15:50

1 Answer 1

3

The feature is actually built in to apachesolr.module. It is called 'mlt' (short for More Like This).

You can add differently configured MLT blocks via ?q=admin/settings/apachesolr/mlt/add_block and then configure their visibility in ?q=admin/build/block or whatever block visibility mechanism you are using (context etc).

2
  • 1
    Nice! It never ceases to amaze me how Drupal developers spend weeks/months writing modules that do incredible things and then don't write a single character of documentation about it on the project page or readme file. Aug 29, 2012 at 14:11
  • Yes but it disappeared in the latest version Jan 29, 2016 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.