ElasticSearch "2.4.4"
Java "1.8.0_151"
Hi folks,
The first example fails with MapperParsingException[Analyzer [bigrams] not found for field [displayName]];.
here is https://github.com/elastic/elasticsearch/issues/767 similar closed issues.
But about the case when we are using settings.json in resource and spring data annotations (@Setting(settingPath = "/settings/settings.json") in class level, and @Field(type = FieldType.String, analyzer = "bigrams") for corresponding field) .
{
"index":{
"analysis":{
"filter":{
"bigrams_filter":{
"type":"ngram",
"min_gram":"2",
"max_gram":"2"
}
},
"analyzer":{
"bigrams":{
"type":"custom",
"tokenizer":"standard",
"filter":[
"lowercase",
"bigrams_filter"
]
}
}
}
}
}
@Setting(settingPath = "/settings/settings.json")
public abstract class AbstractSearchEntity implements Entity {
........
@field(type = FieldType.String, analyzer = "bigrams")
private String displayName;`
..........
}
regards Hayk Hovhannisyan