How to add per-field and customized analyzer to elastic search

Hi, all
I need to used different analyzer for each field of my document and
also the analyzer can not be composed using the provided tokenizer,
filters by elasticsearch.

Can i put my *.class some where and configure elasticsearch to use it?

You can specify a custom filter in elasticsearch.json with that it is
easy to specify the whole analyzer:

{
"index" : {
"analysis" : {
"analyzer" : {
"index_analyzer" : {
"tokenizer" : "whitespace",
"filter" : ["jetwickfilter", "lowercase",
"snowball"]
},
"search_analyzer" :
{
"tokenizer" : "whitespace",
"filter" : ["jetwickfilter", "lowercase",
"snowball"]
}
},
"filter" : {
"jetwickfilter": {
"type" : "de.jetwick.es.JetwickFilterFactory"
},
"snowball": {
"type" : "snowball",
"language" : "English"
}
}
}
}
}

On May 16, 12:04 pm, Weiwei Wang ww.wang...@gmail.com wrote:

Hi, all
I need to used different analyzer for each field of my document and
also the analyzer can not be composed using the provided tokenizer,
filters by elasticsearch.

Can i put my *.class some where and configure elasticsearch to use it?

thanks,tableyourtime.

What i need is a per-field analyzer, how can i custom it and where
should i put my own *.class files?

On May 16, 7:21 pm, Karussell tableyourt...@googlemail.com wrote:

You can specify a custom filter in elasticsearch.json with that it is
easy to specify the whole analyzer:

Elasticsearch Platform — Find real-time answers at scale | Elastic...

{
"index" : {
"analysis" : {
"analyzer" : {
"index_analyzer" : {
"tokenizer" : "whitespace",
"filter" : ["jetwickfilter", "lowercase",
"snowball"]
},
"search_analyzer" :
{
"tokenizer" : "whitespace",
"filter" : ["jetwickfilter", "lowercase",
"snowball"]
}
},
"filter" : {
"jetwickfilter": {
"type" : "de.jetwick.es.JetwickFilterFactory"
},
"snowball": {
"type" : "snowball",
"language" : "English"
}
}
}
}

}

On May 16, 12:04 pm, Weiwei Wang ww.wang...@gmail.com wrote:

Hi, all
I need to used different analyzer for each field of my document and
also the analyzer can not be composed using the provided tokenizer,
filters by elasticsearch.

Can i put my *.class some where and configure elasticsearch to use it?