Is there a way to show only nodes that are in the current users language? Either filter it out of the results by a simple check or directly in the query?

I was hoping there would be a hook to alter the results before the pager is created, i got as for as filtering out the other language in hook_apachesolr_search_page_alter() but thats to late, then you get a pager for 3 pages with only one result.

I also tried Apache Solr Multilingual but that doesn't seem the work really well at the moment for 7.x.

Comments

nick_vh’s picture

You should probably facet on the language. I you want to do this dynamic, then you should expose this as a facet. There are numerous issues in the queue that can tell you how to do that

hook_apachesolr_query_alter($query) {
$query->addFilter('language', 'en');
}
nick_vh’s picture

Status: Active » Closed (fixed)