So, i have been trying to add unique token filter with parameters without creating a separate token filter in my custom analyzer.
According to documentation an example of token filter with parameters without creating a separate token filter: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-length-tokenfilter.html#analysis-length-tokenfilter-analyze-ex
According to documentation an example of token filter with parameters without creating a separate token filter: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-unique-tokenfilter.html
PUT pokemon
{
"settings":
{
"analysis":
{
"analyzer":
{
"deba_analyzer":
{
"char_filter": ["html_strip"],
"tokenizer": "uax_url_email",
"filter": ["lowercase","stop","kstem",{"type": "unique","only_on_same_position": true}]
}
}
}
},
"mappings":
{
"properties":
{
"name":
{
"type":"text"
}
}
}
}
However, cutting to the chase, its giving me error:
"reason" : "Failed to load settings from [{\"analysis\":{\"analyzer\":{\"deba_analyzer\":{\"filter\":[{\"only_on_same_position\":true,\"type\":\"unique\"}],\"char_filter\":[\"html_strip\"],\"tokenizer\":\"uax_url_email\"}}}}]",
"caused_by" : {
"type" : "illegal_state_exception",
"reason" : "only value lists are allowed in serialized settings"
}