Search Api Autocomplete doesnt filter by language We're using Search API Autocomplete with Search API 7.x-1.9 on a site set up with Solr (Websolr) serving nodes in both English and German.

I'm looking to be able to filter the results by ss_search_api_language field which is presently not happening and as such i get autocomplete results for all both languages.

What would be the correct approach to deal with this?
This issue has been fixed by fons vandamme via the drupal module issue tracker


function filter_by_language_search_api_query_alter(SearchApiQueryInterface $query) {
  //if query is of type search_api_autocomplete we will add our extra language filter
  if (strpos($query->getOption('search id'), 'search_api_autocomplete:') !== false) {
      dsm($query->getOption('search id'));


      global $language;


      $filter = $query->createFilter('AND');
      $filter->condition('language', $language->language, '==');
      $query->filter($filter);


  }
}


Make sure the language of your nodes are in the index.

https://www.drupal.org/node/2166113