After upgate from 6.X to 7.X
I got next error in index create
RequestError(400, 'mapper_parsing_exception',
'Root mapping definition has unsupported parameters:
[speechanalytics-transcript : {
properties={
transcript_operator={similarity=scripted_tfidf, type=text}}]')
query body is
{
'settings': {
'similarity': {
'scripted_tfidf': {
'type': 'scripted',
'script': {'source': 'double tf = doc.freq; return query.boost * tf;'},
},
},
},
'mappings': {
'speechanalytics-transcript': {
'properties': {
'transcript_operator':{
'type': 'text',
'analyzer': 'standard',
'similarity': 'scripted_tfidf',
}
}
}
}
}
In new version mapping type was removed https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html
need to change mapping
'mappings': {
'speechanalytics-transcript': {
'properties': {
'transcript_operator':{
'type': 'text',
'analyzer': 'standard',
'similarity': 'scripted_tfidf',
}
}
}
}
to
'mappings': {
'properties': {
'transcript_operator':{
'type': 'text',
'analyzer': 'standard',
'similarity': 'scripted_tfidf',
}
}
}
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