When searches are restricted to the current language, titles are returned normally but all the snippets are missing. Apache Solr search worked fine in both languages before the site was upgraded from Drupal 6 to Drupal 7. The site employs two languages (English and French) and is currently running Drupal 7.22.

When the query setting 'Limit search to current language by default' is set, snippets are always missing. When this checkbox is unset, and the index recreated, the snippets reappear.

Alternatively, if the two checkboxes 'Limit search to current language by default' and 'Limit search to current language could be disabled by user' are both set, the problem can be reproduced in real time on the search page by toggling the 'Search all languages' checkbox.

Comments

mkalkbrenner’s picture

Priority: Major » Normal

Maybe it's a problem in your setup, because it works at these sites which use the same index but are "limited to current language":
https://pgsbox.de/search/site/thrombose
https://pgsbox.com/search/site/thrombosis
("Did you mean" is broken at the moment)

So let us check your setup:
- If you use apachesolr_multilingual dev you must install apachesolr dev, too
- Are you using entity translation or content translation (aka node trandslation)?
- What steps did you take to update your site?

mkalkbrenner’s picture

I thought again about your issue.
Maybe the issue is resolved when you update to the latest dev versions and re-index!
The snippet for language limited results is something we changed during dev.

dwhutton’s picture

I am using content translation, not entity translation.

I updated to the latest dev version of apachesolr_multilingual, but in this configuration the options for searching only in the current language and to provide a user override have both disappeared! (The fourth tab that used to appear under configure apachesolr is gone.)

I also tried updating to the latest dev version of both apachesolr_multilingual and apachesolr, but this does not change the symptoms.

I notice the following php errors are logged. I hope that these provide some clues:

Undefined index: custom_settings in apachesolr_multilingual_apachesolr_query_alter() (line 403 of /home/XXXX/public_html/sites/all/modules/apachesolr_multilingual/apachesolr_multilingual.module)

Undefined index: custom_settings in apachesolr_multilingual_form_apachesolr_search_custom_page_search_form_alter() (line 481 of /home/XXXX/public_html/sites/all/modules/apachesolr_multilingual/apachesolr_multilingual.module).

dwhutton’s picture

Some more information. After changing versions of the modules I cleared all caches, ran update.php, deleted the apachesolr index and restarted the indexing process.

mkalkbrenner’s picture

Status: Active » Needs review

Update to latest dev and repeat the steps. I committed a two fixes:

http://drupalcode.org/project/apachesolr_multilingual.git/commit/1f671ce
http://drupalcode.org/project/apachesolr_multilingual.git/commit/5d9b29e

(The problem was, that I still had some $custom_settings in my database which hided the error.)

dwhutton’s picture

It seems to be working properly now. Thank you!

mkalkbrenner’s picture

Status: Needs review » Fixed

thanks for testing

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Minor edit of issue description