Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hitoshi Ozawa
Language restriction in Search
August 25, 2011 4:32 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

With Liferay, it is possible to create web contents based on different language. However, the search returns all matching result for all the language.
I would like to specify a language (default to the language which I've selected) when doing a search.

The background behind this is, I've created some Japanese wiki pages here on Liferay.com. Now, when I do a search, these Japanese pages are
being listed in the result with English pages. This is really bothersome because I usually don't want results in other languages.
Jorge Ferrer
RE: Language restriction in Search
August 26, 2011 2:26 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2726

Join Date: August 31, 2006

Recent Posts

Hey Hitoshi,

For Web Content it isn't happening. For wiki, I think the solution in this case for Liferay.com would be to create a different wiki node per language. I'm planning to create at least two new nodes for Japanese and Spanish. In fact I had in my todo list checking with you that you were ok with this idea. What do you think?

My plan is to try to move the pages that already exist in Japanese automatically with an SQL by looking for certain characters that are in all or most Japanese wiki pages. Any suggestion?
Hitoshi Ozawa
RE: Language restriction in Search
August 26, 2011 5:15 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

There only seems to be an English Web Content page here so that's ok. Your plan with the wiki nodes is OK with me but I was actually looking
for a more general solution that will become part of the distribution.
Jorge Ferrer
RE: Language restriction in Search
August 29, 2011 12:18 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2726

Join Date: August 31, 2006

Recent Posts

Hi Hitoshi,

I fully agree. I think the generic solution will need to be specific for each application (and asset type). For wiki, I think using a node for each language is the first step (just like Wikipedia has a separate installation for each language). Next, we could add some specific funtionalities such as allowing wiki administrators to specify the node language and based on that allow page authors to link each page to the equivalent in other languages. Since the backend to link assets is already in the product I would like to try to build this functionality on liferay.com first and then include it in the next version of the product.

The first step for that is to split the current node into one for each lang. Could you paste here some Japanese chars that we could use to automatically identify the pages in that language in an SQL sentence?
Hitoshi Ozawa
RE: Language restriction in Search
August 29, 2011 5:02 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

Sure, for starters:




Jorge Ferrer
RE: Language restriction in Search
August 31, 2011 2:21 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2726

Join Date: August 31, 2006

Recent Posts

Thanks!

I hope to have this done this week. Let me know through this thread if you find any problems one it is done.
Hitoshi Ozawa
RE: Language restriction in Search
August 31, 2011 2:00 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

Great! Will check it out next week and let you know. emoticon
Hitoshi Ozawa
RE: Language restriction in Search
September 8, 2011 7:57 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

BTW, which analyzer is Liferay.com using? Is Liferay.com using Solr or Lucene?
There are several different analyzers for a specific language. I know there is one for Japanese and for Chinese which
can be used with Liferay. I think most installations aren't using the default CJKAnalyzer because it's not very good.
Jorge Ferrer
RE: Language restriction in Search
September 11, 2011 11:55 PM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2726

Join Date: August 31, 2006

Recent Posts

AFAIK, it's just using lucene. Which one would you suggest.
Hitoshi Ozawa
RE: Language restriction in Search
September 12, 2011 2:44 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

I though Solr was the recommendation on clustered environment.

The Japanese text standard analyzer for Lucene/Solr is gosen:
http://code.google.com/p/lucene-gosen/