Apache Solr language filter

This project is obsolete! Use the latest release from the official project page.
Release Package Date
6.x-1.x-dev-pasq Download (645 bytes) Release notes Oct 9 2009

UPDATE: The functionality is now part of Apachesolr Multilingual module
see: http://drupal.org/project/apachesolr_multilingual

Filter the apachesolr result to language neutral or active language only.

UPDATE: the module needs to be changed to work with apachesolr-6.x-1.0 release, see: #394728
bug: the language filter is displayed in the breadcrumb, and there is no way in apachesolr-6.x-1.x to remove this filter form the breadcrumb..
workaround: add this code into _preprecess_page(&$vars)

  if (arg(0) == 'search') {
    // Remove language filters from breadcrumb. This could be removed when
    // apachesolr-6.x-2.x will be used on the site.
    $breadcrumb = drupal_get_breadcrumb();
    $langcodes = array_keys(language_list());
    foreach ($breadcrumb as $key => $link) {
      if (strpos($link, '-language') || in_array($link, $langcodes)) {
    // The last breadcrumb is the current page, so it shouldn't be a link.
    $last = count($breadcrumb) - 1;
    $breadcrumb[$last] = strip_tags($breadcrumb[$last]);
    $vars['breadcrumb'] = theme('breadcrumb', $breadcrumb);
Sponsored by