Forums / General / Search problem within different translations of the object
Roman Pszonczenko
Wednesday 09 July 2003 5:41:53 am
I have the following problem: I defined three translations for my object (english, polish and russian). ContentObjectLocale in site.ini was set to pol-PL. As a result during publishing the object the words from polish translation were added only to ezsearch_word table in the database and this affected search conditions - only polish version was searchable. Then I changed ContentObjectLocale to eng-GB and republished my object again, only words from english translation were added to ezsearch_word table and only english version of my object was serchable. The same situation was with russian translation.If anybody knows how to deal with it, please help me.
Albert Berenguer
Friday 10 October 2003 9:41:26 am
maybe you found it too, and i'm late, but i had the same problem and found the solution here:
http://ez.no/developer/ez_publish_3/bug_reports/search_translated_words
bye!
Esben Visfeldt
Tuesday 09 March 2004 11:44:39 am
I have a follow up question to this search problem. As a bug resolution, Bård Farstad (04/02/2004 8:54 am) wrote: "As of version 3.3 eZ publish indexes all translations of an object and will return a hit on any translation when searching." I've installed ezPublish 3.3 and I've built a multilingual site. For each language site I have a search page, and I only want results in the current language, e.g. english site returns search result pages with english content. According to my interpretation of what Bård says, if I search for a particular word that exists in several translations of the same node, the search engine will return the node several times. I should then be able to look at the object.default_language and language_code and if they are not equal, discard the result. But I can't get it to work...I think I've missed something. Is it through the contentobject_version_object.translation.language_code that I see the current translation language or some other value???Please, help!
Wednesday 10 March 2004 9:43:42 pm
After some more investigation, it seems that even if a word is positively in several translations of the same node, the search engine only returns the node once...and I can't read in which translation the word was found. In searchresult.tpl, I am reading the results from the section:{section name=SearchResult loop=$search_result show=$search_result sequence=array(bglight,bgdark)}