Language analyser

hi,

I'm using rails and tire and my site is in 5 languages. How can I specify a
different analysis for each language?
I think I will use Lang Analyzer English, french and russian, but the Lithuanian
and Georgian, I do not know what to do, someone would have an idea?

thank you

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Each field in the index can only be analyzed with one analyzer. If you want
to support multiple languages, there are different approaches, each with
its own pros and cons. The simplest way is to have a separate field for
each language. Your indexing/searching code will need to contain logic
about how to identify the proper field to use.

--
Ivan

On Mon, Jul 8, 2013 at 7:52 PM, oto iashvili optimum.dulopin@laposte.netwrote:

hi,

I'm using rails and tire and my site is in 5 languages. How can I specify
a different analysis for each language?
I think I will use Lang Analyzer English, french and russian, but the Lithuanian
and Georgian, I do not know what to do, someone would have an idea?

thank you

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi thanks for answer.

That is exactly what im trying to but, but it seems it doesnt work, at
least for stop word

here my mapping

{:id=>{:type=>"integer", :index=>:not_analyzed},
:sousrubrique_id=>{:type=>"integer", :index=>:not_analyzed},
:ville_id=>{:type=>"integer", :index=>:not_analyzed},
:titre_fr=>{:analyzer=>"french", :as=>#<Proc:0x00000008381078@(eval):1
(lambda)>, :type=>"string"}, :texte_fr=>{:analyzer=>"french",
:as=>#<Proc:0x00000008380da8@(eval):2 (lambda)>, :type=>"string"},
:titre_ka=>{:analyzer=>"standard", :as=>#<Proc:0x000000085ba1a0@(eval):1
(lambda)>, :type=>"string"}, :texte_ka=>{:analyzer=>"standard",
:as=>#<Proc:0x000000085b9f20@(eval):2 (lambda)>, :type=>"string"},
:titre_en=>{:analyzer=>"english", :as=>#<Proc:0x000000085fef80@(eval):1
(lambda)>, :type=>"string"}, :texte_en=>{:analyzer=>"english",
:as=>#<Proc:0x000000085febe8@(eval):2 (lambda)>, :type=>"string"},
:titre_ru=>{:analyzer=>"russian", :as=>#<Proc:0x0000000840fa80@(eval):1
(lambda)>, :type=>"string"}, :texte_ru=>{:analyzer=>"russian",
:as=>#<Proc:0x0000000840f210@(eval):2 (lambda)>, :type=>"string"},
:titre_lt=>{:analyzer=>"standard", :as=>#<Proc:0x00000008709790@(eval):1
(lambda)>, :type=>"string"}, :texte_lt=>{:analyzer=>"standard",
:as=>#<Proc:0x00000006fba1c0@(eval):2 (lambda)>, :type=>"string"}

and here and example of request
curl -X GET '
http://localhost:9200/georgieannonces/annonce/_search?from=0&size=30&pretty'
-d
'{"query":{"filtered":{"query":{"query_string":{"query":"aaaaaaaaaaaaaaaaaaaaaaa
de","fields":["titre_fr","texte_fr"]}},"filter":{"and":[{"range":{"sousrubrique_id":{"from":null,"to":85}}}]}}},"sort":[{"_id":"desc"}],"highlight":{"fields":{"texte_fr":{"fragment_size":200},"titre_fr":{"number_of_fragments":0}}},"size":30,"from":0}'

but this request give result with "de" that should not be as it is include
in stop_word and I dont understand why. Any idea ?

On Tuesday, July 9, 2013 6:56:01 PM UTC+2, Ivan Brusic wrote:

Each field in the index can only be analyzed with one analyzer. If you
want to support multiple languages, there are different approaches, each
with its own pros and cons. The simplest way is to have a separate field
for each language. Your indexing/searching code will need to contain logic
about how to identify the proper field to use.

--
Ivan

On Mon, Jul 8, 2013 at 7:52 PM, oto iashvili <optimum...@laposte.net<javascript:>

wrote:

hi,

I'm using rails and tire and my site is in 5 languages. How can I specify
a different analysis for each language?
I think I will use Lang Analyzer English, french and russian, but the Lithuanian
and Georgian, I do not know what to do, someone would have an idea?

thank you

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.