1
votes

I'm using Typo3 and Apache Solr. I have various pages in three different languages. I set up three Solr cores for these languages. Now I want Solr to index the different translations of each page into its proper core (english page -> core_en etc.) I wrote following code in Typoscript:

[globalVar = GP:L = 0]
plugin.tx_solr.solr.path = /solr/core_en/
[global]
[globalVar = GP:L = 1]
plugin.tx_solr.solr.path = /solr/core_de/
[global]
[globalVar = GP:L = 2]
plugin.tx_solr.solr.path = /solr/core_zh/
[global]
plugin.tx_solr.solr.host = localhost
plugin.tx_solr.solr.port = 8080
plugin.tx_solr.solr.scheme = http

This works fine. The problem is when there is a page without a translation e.g. in german. Typo3 automaticly 'falls back' to the default language and idexes it in this case into the english core instead. Is there a way to verify if a page exists in a certain language so Solr does not index it?

1

1 Answers

1
votes

Ok I've figured out how to do this. In my case it worked adding/modifying following Typoscript line:

sys_language_mode = strict

This effects that if there is no translation in a certain language it does not redirect to the default language but show an 'page not found' error. So in the indexing process there is simply no page to index.