laszlocsontos/liferay-portal — pull request #21 by vilmospapp (2014-01-28 12:13:57+00:00)
Title: [TECHNICAL SUPPORT] LPS-43338 Advanced search in Related Assets doesn't find the articles where the default language is different

Hi Laci,

This PR fixes an issue where articles with different default locale are not shown up in the results of related asset search even the localized search field contains the search term.

e.g.:
Article-A default locale is en_US, title is: Test Content A

Article-B default locale is en_GB, title is: Test Content B

when you try to search for keyword: content in Related Assets' search, you will see both articles listed. When you try the advanced search and type content as title and search for it, you will see only Article-A if your locale is en_US.

I've tried to search for similar places where this issue could be also a problem, like AssetIndexer, but as far as I can see, the localization doesn't come in picture elsewhere than in JournalArticleIndexer.

Please note that in BaseIndexer we have the same method what is overridden in JournalArticleIndexer, but there this logic cannot be used as it doesn't deal with the localization in place, but a level above.