Indexing files does not store the language
By default, the files that get indexed are bound to a specific page ID, but the file in the index is not bound to a specific language. This results in showing / not showing the files in the wrong situations.
- Given a site with DE (L=0) as default and FR (L=1) as additional language
- There is a page that links to files:
- The German Page links to a file "DE.pdf" that contains the word "Deutsch"
- The French Page links to a file "FR.pdf" that contains the word "français"
- The page is being indexed via FE-Indexing, in both languages
- Searching for "Deutsch" should
- find the "DE.pdf" file while searchin in the DE-Frontend
- NOT find the "DE.pdf" file when searching in the FR-Frontend (as it's not linked to the FR-Page!)
- Searching for "français" (with or without the special character, searching for "francais" results in the same behavior) should
- find the "FR.pdf" file while searching in the FR-Frontend
- NOT find the "FR.pdf" file when searching in the DE-Fronten (as it's not linked on the DE-page!)
All indexed files are only ever shown when searching in the default language - and of course only when they match the search term.
In the FR-page, no single file is being shown as search result - because the file is indexed/stored with "sys_language_uid == 0" in the database.
I'll add a patch soonish that just adds the sys_language_uid when storing an indexed file to the current sys_language_uid that is being used by TSFE. This works fine for us and solves the above mentioned issue and did not show any negative side-effects in several customer projects.