-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: How many languages does Hibernate Search support?
PostPosted: Mon Apr 08, 2013 10:46 pm 
Newbie

Joined: Sat Jul 23, 2011 12:28 am
Posts: 8
Hi HSearch team,

I'm using Hibernate Search as the search engine for my company web application and it is required to work with all languages. Could I achieve that requirement? At the moment, my search feature seems to work fine with English, French, German ... but can not with Arabic ... (something like أنا لا أعرف)

Thanks a lot.
dungleonhart


Top
 Profile  
 
 Post subject: Re: How many languages does Hibernate Search support?
PostPosted: Tue Apr 09, 2013 7:07 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
we rely on the Analyzers provided by the Apache Lucene community: any existing Analyzer can be used with Hibernate Search.

So for Arabic for example look at http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/analysis/ar/ArabicAnalyzer.html

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: How many languages does Hibernate Search support?
PostPosted: Wed Apr 10, 2013 2:29 am 
Newbie

Joined: Sat Jul 23, 2011 12:28 am
Posts: 8
Hi Sane,

Thanks a lot for your reply.

I can see a lot of analyzers in the HSearch library: EnglishAnalyzer, ArabicAnalyzer, SwedishAnalyzer ...
As I understand, we'll user the appropriate analyzer for the language that we want to support. So in case I want to support both English and Arabic, what should I do? Is there something like a "Unified"Analyzer to use?

Thanks a lot and Best regards,
dungleonhart


Top
 Profile  
 
 Post subject: Re: How many languages does Hibernate Search support?
PostPosted: Wed Apr 10, 2013 5:35 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
there is no "Unified" Analyzer: the default one works on most languages, but poorly as you have found out it has problems with many languages.

The best strategy is to index each entity instance using it's correct language, there is an example here:
http://docs.jboss.org/hibernate/search/4.2/reference/en-US/html_single/#d0e3840

You also should parse the user queries using the appropriate Analyzer: so you need to know the language of each entity, and also need to know the language of user input.

I'd suggest to always restrict the results to the matching language, you could use a Filter for that.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: How many languages does Hibernate Search support?
PostPosted: Wed Apr 10, 2013 11:55 pm 
Newbie

Joined: Sat Jul 23, 2011 12:28 am
Posts: 8
Hi Sane,

It is very clear to me now.
Thank you a lot for your help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.