I realize that apachesolr 2.x and views 3.x are the future, but I have a policy of only using non-dev releases of modules for my live sites. I just started using Solr with a site and would love to have my results page driven by views. However, I cannot use this module because I am using apachesolr 1.x and views 2.x. I was bummed about this until I realized how easy it was to display the results using views:

function {module}_preprocess_search_results(&$variables) {
  $variables['search_results'] = '';
  foreach ($variables['results'] as $result) {
		$views_search_nids[] = $result['node']->nid;
  }
	$variables['search_results'] = views_embed_view('{name of view}', 'default', implode(',', $views_search_nids));
}

The only thing special about my view is that it receives multiple NID arguments. That's it! Now, I realize that my solution is probably not as efficient as what solr 2/views 3 can provide, but what stops apachesolr_views from using this code for those who want to use solr 1/views 2? I propose a separate release that provides this functionality. If this cannot be achieved under this project, I am willing to create my own project, but I wanted to come to you first.

Comments

xiong’s picture

Subscribing. Need the same thing for Views 2 since there's still a long way to go before Views 3 - especially for Drupal 6 and unfortunately this module is currently only available for D6 version..

bojanz’s picture

Views 3 is approaching a release candidate.
Views 2 is only getting bug fixes at this point.

Making an exception when it comes to Views and -dev releases and then updating to RC is your best bet.

That's the general policy.
However, I see that this module doesn't currently work with the current Views 3 dev at all...

vasrush’s picture

But it's working with Views 2.
And that's the purpose of the code.

Thanks for that.

I agree that a new module (or some extra code to this one), compatible with Views 2 would be very helpfull.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Version 6.x is no longer supported due to Drupal 6 End of Life. For Drupal 8.x, use Search API Solr Searchinstead.