I set up apachesolr and _multilingual with Dutch and French content. Everything works as expected except from the language-specific config files. For example synonyms_nl.txt and synonyms_fr.txt are ignored completely. I then tried the synonyms.txt file and this is taken into account for both languages.

Everything is set up correctly and Solr has been restarted and re-indexed for the files to be taken into account.

Comments

mkalkbrenner’s picture

Requested wmostrey to send me the config files.

wmostrey’s picture

I sent apachesolr_multilingual_config.zip to Markus.

mkalkbrenner’s picture

Thanks for the email.

schema.xml has been generated correctly:

<fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">
  ...
  <filter class="solr.SynonymFilterFactory" synonyms="synonyms_nl.txt" ignoreCase="1" expand="true"/>
  <filter class="solr.StopFilterFactory" ignoreCase="1" words="stopwords_nl.txt" enablePositionIncrements="true"/>

But the text files themselves included in the zip file are all empty. Just to be sure, did you enter something into these text files within drupal and do you see the correct file size at "/admin/settings/apachesolr/schema_generator"?

I guess that synonyms.txt is taken into account because you did not "Omit" all the language unspecific fields at "/admin/settings/apachesolr/query-fields" like pointed out in the README.txt.

wmostrey’s picture

The synonym files were altered on the filesystem, not in the Drupal nodes, so that's not the issue.

The "Omit" option is a good suggestion, I'll test this and report back.

mkalkbrenner’s picture

Be aware that synonyms will be added to the text during indexing. You have to re-index.

wmostrey’s picture

Just to be clear: you don't have to re-index in order for the new synonyms.txt to take effect.

However it be: I made sure the language-unspecific fields were Omitted and re-indexed (just to be sure). This didn't change anything: the language-specific synonyms_*.txt files are ignored and the synonyms.txt is used. I also tried with an empty synonyms.txt to make sure it didn't overwrite the language-specific config files but that made no difference.

wmostrey’s picture

Status: Active » Closed (cannot reproduce)