Go with the one doc per title and different fields for each language (title_name_ch, title_name_es) approach. Your application needs to handle what fields to query and return.
-- Jan Høydahl, search solution architect Cominvent AS - www.cominvent.com On 5. mars 2011, at 00.44, cyang2010 wrote: > Hi, > > I wonder how solr can satisfy our multi-language requirement. > > For example, for movie/tv series titles, We require that based on user > preferred language, user is able to get back titles name (and actor, > directors) by selected language. For example, getTitlesByGenreId. On the > other hand, we also support search by title name, actor or director name. > > Therefore, how shall i design the solr schema to accomate the requirement? > > Here is my current schema without consideration of the language: > > > > > > > > > > > > > > > Someone recommended to store as a new doc for the same title in a different > language. Then solr doc has a language field to denote what language the > doc is for. I don't think this can work, right? Now all those title_name > value in different language will share the same index/query analyzer since > they are put int the same field. For different language (asci based vs > asian language), you will need different parser, right? > > The way i see this can work is to add extra field for those language related > field, such as title_name_ch (chinese), title_name_es (spanish) and etc. > Then my application logic need to know what language specific field to query > on based on user language preference. What do you think? > > In summary, shall i go with duplicate doc for title in another language, or > shall i just change my schema to accomodate those additional language > related fields? > > > Thanks. Your help is appreciated. > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Help-on-Multi-language-support-tp2636054p2636054.html > Sent from the Solr - User mailing list archive at Nabble.com.