Search problem within different translations of the object

Search problem within different translations of the object

Wednesday 09 July 2003 5:41:53 am - 3 replies

Modified on Wednesday 09 July 2003 5:52:27 am by Roman Pszonczenko

Author Message

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!

Esben Visfeldt

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)}

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.