lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhecht <>
Subject Re: Multi language indexing
Date Mon, 07 May 2007 17:26:27 GMT


I didn't understand I need to use the PerFieldanalyzerWrapper for this task,
and tried to index the document twice.
Sorry for the previous post.
thanks for the great help.

But if you already asked, I will be happy to explain what my goal is, and
maybe see if i'm approaching this correctly:

I have a database table containing records of company information, like
comapny name, address, city, state ... country.
The companies information may be written in different languages, but I can
determine the language according to the country field each record has (an
exception to this are countries that use more than 1 language).

I have a JSF form containing input fields for each column, so users can
search for companies.
I have my own metadata (stop words...) and matching alghorythms for each
different country, which I want to use during the analysis process of
I have implemented my own analyzer for each country.
So as I see it, when I index these records, I want to provide lucene, with a
specific analyzer per record i'm indexing. 
When a user performs a query in my JSF form, I will use the country value he
entered, to get the needed analyzer, and query lucene with the users query
and the needed analyzer.
The user may also choose not to enter a country value to his search, and
here comes in the solution you gave me, to duplicate each field, and index
it using a non stemming analyzer (A standard analyzer without stop words

Am I going the right direction?

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message