[opencms-dev] Lucene Module

Thomas Gick thomasgick at web.de
Fri Sep 19 22:38:01 CEST 2003


Hi Matt,

thank you very much for the quick answer. I will test it
as soon as possible.

Have a nice weekend.

Thomas



MB> Hi Thomas,

MB> On Fri, 2003-09-19 at 10:26, Thomas Gick wrote:
>> Hi Matt,
>> 
>> is it possible (with your lucene module) to modify the hitlist (links) in this
>> way that the right language parameter (we use different bodies to
>> edit different languages) is appended.
>> 
>> Example: If the search expression is found in a body named "body_en" the parameter
>> lng=en should be appended to the generated link. So i know, which body
>> has to be served because normalewise only the prefered language body
>> of a html page is shown. In this case i want to serve the body in
>> which the expression was found.
>> 
>> Can i do this with your module?

MB> That depends... if you can get the body name (e.g. body_en), the you
MB> should be able to set the parameter pretty easily by doing something
MB> like:

MB> String params="?lng=";
MB> if("body_en".equals(body_name)) params += "en";
MB> else params .= "de";

MB> and then append 'params' to the link. You could also create a CmsObject
MB> and then use the file ID to get information about the file from the VFS.
MB> Or, you can always rewrite the implementations of I_DocumentFactory and
MB> just add the language to the index.

MB> While that last option may sound like the hardest, it shouldn't be too
MB> bad, and it might be the fastest and best way to do it in the long run.

MB> Hope that helps,

MB> Matt

 




-- 
Best regards,
 Thomas                            mailto:thomasgick at web.de




More information about the opencms-dev mailing list