I m trying to create my custom analyzer using elastic search, this is my setting.json file located in the given path
{
"analysis": {
"analyzer": {
"lowercase": {
"type": "custom",
"tokenizer": "keyword",
"filter": [
"lowercase"
]
}
}
When I start my application then following error occurs
[ restartedMain] .d.e.r.s.AbstractElasticsearchRepository : failed to load elasticsearch nodes : org.elasticsearch.index.mapper.MapperParsingException: analyzer [lowercase] not found
@Document(indexName="user",type="userdetails",shards=1)
@Entity
@Table(name="user")
@Setting(settingPath = “J://setting.json”)
public class user implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@org.springframework.data.annotation.Id
private String userid;
@Column(nullable=false)
@Field(type=FieldType.String,store=true)
private String username;
@Column(nullable=false)
@MultiField(
mainField = @Field(type = FieldType.String,index = FieldIndex.analyzed,analyzer="lowercase"),
otherFields = {
@InnerField(index = FieldIndex.not_analyzed, suffix = "not_analyzed", type =FieldType.String)
}
)
private String city;