I want to use fields named foo.ngram
& foo.kuromoji
(kuromoji
is Japanese morphological analyzer).
Setting like below does not work, saying No type specified for field [foo]
.
{
"mapping": {
"properties": {
"foo": {
"fields": {
"ngram": {
"type": "text",
"analyzer": "ngram_analyzer"
},
"kuromoji": {
"type": "text",
"analyzer": "kuromoji_analyzer"
}
}
}
}
}
}
It seems I must set default type and analyzer to foo
like this:
{
"mapping": {
"properties": {
"foo": {
"fields": {
"type": "text",
"analyzer": "kuromoji_analyzer",
"ngram": {
"type": "text",
"analyzer": "ngram_analyzer"
}
}
}
}
}
}
But I prefer the first one. Is there any way to do it?