prasad98
(Harshit )
February 10, 2020, 1:16pm
1
Hi, I'm trying to migrate my ES setup from 2.3 to 7.5. However, I'm facing an error with my custom analyzer:
elastic: Error 400 (Bad Request): analyzer [keyword_lowercase_remove_space] not found for field [identity_exact] [type=mapper_parsing_exception]
My mappings and analyzer settings look like this:
{
"settings": {
"analysis": {
"analyzer": {
"keyword_lowercase_remove_space": {
"type": "custom",
"tokenizer": "keyword",
"filter": []string{"lowercase", "keyword_repeat", "minimal_eng_stem", "custom_unique", "filter_whitespace_remove"}
}
}
}
},
"mappings": {
"properties": {
"promotions": {
"properties": {
"product_name": {
"type": "text",
"fields": {
"identity_exact": {
"type": "text",
"analyzer": "keyword_lowercase_remove_space"
}
}
}
}
}
}
}
}
I'm not able to debug the problem, why this problem is occurring. I've gone through the breaking change documentation but didn't found any relevant solution. It would be great if anyone can help me through this.
dadoonet
(David Pilato)
February 10, 2020, 2:56pm
2
I don't have the same message:
DELETE test
PUT test
{
"settings": {
"analysis": {
"analyzer": {
"keyword_lowercase_remove_space": {
"type": "custom",
"tokenizer": "keyword",
"filter": [
"lowercase",
"keyword_repeat",
"minimal_eng_stem",
"custom_unique",
"filter_whitespace_remove"
]
}
}
}
},
"mappings": {
"properties": {
"promotions": {
"properties": {
"product_name": {
"type": "text",
"fields": {
"identity_exact": {
"type": "text",
"analyzer": "keyword_lowercase_remove_space"
}
}
}
}
}
}
}
}
I'm getting:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[instance-0000000020][172.17.0.43:19461][indices:admin/create]"
}
],
"type": "illegal_argument_exception",
"reason": "Custom Analyzer [keyword_lowercase_remove_space] failed to find filter under name [minimal_eng_stem]"
},
"status": 400
}
Which is expected as minimal_eng_stem
is not defined.
prasad98
(Harshit )
February 10, 2020, 5:30pm
3
PUT /test-index-v2/
{
"settings": {
"analysis": {
"filter": {
"minimal_eng_stem": {
"type": "stemmer",
"name": "minimal_english"
},
"custom_unique": {
"type": "unique",
"only_on_same_position": "true"
},
"filter_whitespace_remove": {
"type": "pattern_replace",
"pattern": " ",
"replacement": ""
}
},
"analyzer": {
"keyword_lowercase_remove_space": {
"type": "custom",
"tokenizer": "keyword",
"filters": ["lowercase", "keyword_repeat", "minimal_eng_stem", "custom_unique", "filter_whitespace_remove"]
}
}
}
},
"mappings": {
"properties": {
"promotions": {
"properties": {
"merchant_product": {
"type": "text",
"fields": {
"identity_exact": {
"type": "text",
"analyzer": "keyword_lowercase_remove_space"
}
}
}
}
}
}
}
}
I've updated this query. This query is giving me same error when I try to create index using NewIndicesCreateService
in Golang ES client API and call NewIndicesPutMappingService
to put mappings.
dadoonet
(David Pilato)
February 10, 2020, 6:12pm
4
When I run it from the Kibana dev console, it works fine.
So I'm guessing there's something wrong with your code or with the Golang ES client you are using.
system
(system)
Closed
March 9, 2020, 6:12pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.