gpt4 book ai didi

python - 出现Elasticsearch映射错误时如何查看显式字段名称

转载 作者:行者123 更新时间:2023-12-03 01:31:09 25 4
gpt4 key购买 nike

我有以下Elasticsearch映射错误消息。

{
'index': {
'_index': 'product-staging-2-products',
'_type': 'product',
'status': 400,
'_id': '776896',
'error': {
'type': 'mapper_parsing_exception',
'reason': 'failed to parse',
'caused_by': {
'type': 'number_format_exception',
'reason': 'empty String'
}
}
}
}

我了解会发生此错误,因为我的“产品”对象的字段之一期望一个数字,但收到一个空字符串。但是,有什么方法可以显式记录哪个字段接收此空字符串?

最佳答案

您可以通过在索引查询中附加&error_trace=true查询字符串参数来尝试enabling stack traces,可能会获得有关导致此错误的字段的更多信息。

关于python - 出现Elasticsearch映射错误时如何查看显式字段名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55905956/

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