You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by abiratsis <ab...@gmail.com> on 2011/03/18 02:18:03 UTC

Greek and English text into the same field

Hello everyone,

I have a index that contains text (several fileds) that can be in English or
in Greek. I have found the corresponding filters

solr.GreekLowerCaseFilterFactory
solr.GreekStemFilterFactory

for the greek language along with the special type text_greek included to
the default schema.xml file, although I need to know if I can use them with
the existing filters for a text field (embed them to the existing
configuration for english). 

So my 1st question is if I can simply add these two filters to the existing
field types or an extra configuration needed? 

And the 2nd question is about how to handle the greek synonyms-stopwords...
should I simply add onether solr.SynonymFilterFactory filter to the existing
configuration? Should I merge both files (english-greek) together?

Basicaly I don't know what the best approach is for handling a multilingual
case like mine e.g:should I create a seperate index for each language?

Any suggestions appreciated...

Thanx,
Alex




--
View this message in context: http://lucene.472066.n3.nabble.com/Greek-and-English-text-into-the-same-field-tp2696186p2696186.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Greek and English text into the same field

Posted by abiratsis <ab...@gmail.com>.
OK thanx a lot guys, one last question is there any need to download and
embed the stopwords-synonyms files or solr.war already contains them?

--
View this message in context: http://lucene.472066.n3.nabble.com/Greek-and-English-text-into-the-same-field-tp2696186p2697795.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Greek and English text into the same field

Posted by Upayavira <uv...@odoko.co.uk>.
You're likely going to have to try it and see what works. But here's
some suggestions:

If the content is merged inseparably into one field, maybe you could
index that field twice, as text_en and text_gr using copyField. You
could then have a different analyser for each, and see what results you
get when you do your search against both fields.

If your code is separable, you could have text_en and text_gr, each with
their own language specific analyser chains, and index your content into
the field relevant for that language.

HTH

Upayavira


On Thu, 17 Mar 2011 18:18 -0700, "abiratsis" <ab...@gmail.com>
wrote:
> Hello everyone,
> 
> I have a index that contains text (several fileds) that can be in English
> or
> in Greek. I have found the corresponding filters
> 
> solr.GreekLowerCaseFilterFactory
> solr.GreekStemFilterFactory
> 
> for the greek language along with the special type text_greek included to
> the default schema.xml file, although I need to know if I can use them
> with
> the existing filters for a text field (embed them to the existing
> configuration for english). 
> 
> So my 1st question is if I can simply add these two filters to the
> existing
> field types or an extra configuration needed? 
> 
> And the 2nd question is about how to handle the greek
> synonyms-stopwords...
> should I simply add onether solr.SynonymFilterFactory filter to the
> existing
> configuration? Should I merge both files (english-greek) together?
> 
> Basicaly I don't know what the best approach is for handling a
> multilingual
> case like mine e.g:should I create a seperate index for each language?
> 
> Any suggestions appreciated...
> 
> Thanx,
> Alex
> 
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Greek-and-English-text-into-the-same-field-tp2696186p2696186.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 
--- 
Enterprise Search Consultant at Sourcesense UK, 
Making Sense of Open Source


Re: Greek and English text into the same field

Posted by Robert Muir <rc...@gmail.com>.
On Thu, Mar 17, 2011 at 9:18 PM, abiratsis <ab...@gmail.com> wrote:
>
> Basicaly I don't know what the best approach is for handling a multilingual
> case like mine e.g:should I create a seperate index for each language?
>

In this particular case (Greek, English), they use totally distinct
characters. so their terms will never conflate with each other, their
stemmers will never mess with the other language's text, etc.

So I would:
a. switch from LowerCaseFilter to GreekLowerCaseFilter... it
lowercases english the same way, don't worry.
b. add greek stopwords file to your stopfilter. stopfilterfactory can
take multiple file arguments... just separate them with a comma.
c. add the greek stemmer right after the porter stemmer.

then your field works fine for greek and english...