gpt4 book ai didi

elasticsearch - Elastic 7.X Root 映射定义包含不受支持的参数

转载 作者:行者123 更新时间:2023-12-03 02:37:16 25 4
gpt4 key购买 nike

从 6.X 升级到 7.X 后

我在索引创建中遇到下一个错误

RequestError(400, 'mapper_parsing_exception', 
'Root mapping definition has unsupported parameters:
[speechanalytics-transcript : {
properties={
transcript_operator={similarity=scripted_tfidf, type=text}}]')

查询正文是
{
'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',
}
}
}
}
}

最佳答案

在新版本中删除了映射类型
https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html

需要改变映射

    'mappings': {
'speechanalytics-transcript': {
'properties': {
'transcript_operator':{
'type': 'text',
'analyzer': 'standard',
'similarity': 'scripted_tfidf',
}
}
}
}


    'mappings': {
'properties': {
'transcript_operator':{
'type': 'text',
'analyzer': 'standard',
'similarity': 'scripted_tfidf',
}
}
}

关于elasticsearch - Elastic 7.X Root 映射定义包含不受支持的参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58643544/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com