I am attempting to upgrade to Elasticsearch v7 (I'm using the ruby/rails client), and upon doing so and fixing several stuff, I run across the following error
Elasticsearch::Transport::Transport::Errors::BadRequest:
[400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."}],"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."},"status":400}
Upon checking the breaking changes, it is indeed mentioned that
The standard token filter has been removed because it doesn’t change anything in the stream.
I am not sure how I should reflect this in my config. If I understand correctly, this error may come from my custom phrase suggester
{
"analysis": {
"filter": {
"shingle": {
"type": "shingle",
"min_shingle_size": 2,
"max_shingle_size": 3
}
},
"analyzer": {
"trigram": {
"type": "custom",
"tokenizer": "standard",
"filter": ["standard", "shingle"]
},
"reverse": {
"type": "custom",
"tokenizer": "standard",
"filter": ["standard", "reverse"]
}
}
}
}
Should I just remove the tokenizer
field ? Maybe they forgot to update it but this is still what's mentionned in the [Elasticsearch documentation of the suggester][1]
If the problem is not coming from there, where should I look into ?
Credit goes to @Rob in the comments:
{
"analysis": {
"filter": {
"shingle": {
"type": "shingle",
"min_shingle_size": 2,
"max_shingle_size": 3
}
},
"analyzer": {
"trigram": {
"type": "custom",
"tokenizer": "standard",
"filter": ["shingle"]
},
"reverse": {
"type": "custom",
"tokenizer": "standard",
"filter": ["reverse"]
}
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With