gpt4 book ai didi

elasticsearch - 如何使用原因 “empty String”调试 Elasticsearch 错误number_format_exception但没有字段名称

转载 作者:行者123 更新时间:2023-12-02 23:54:18 26 4
gpt4 key购买 nike

我刚刚部署了一个小型应用程序,该应用程序将几千个文档加载到索引中,当使用生产数据时,我的搜索请求中出现错误。

http代码是400,错误是

{
"error": {
"root_cause": [
{
"type": "number_format_exception",
"reason": "empty String"
}
],
"type": "number_format_exception",
"reason": "empty String"
},
"status": 400
}

好的,我的映射定义了一个数字字段,我以前似乎无法正确存储它,但是我应该如何找到该字段呢?

每个文档都包含杂乱无章的字段...。我的意思是,真的吗?

我尝试在/ var / log / elasticsearch中查找,但是那里没有任何用处...

请帮助我,我需要把事情做好

我将字段定义为整数,该整数应包含数组,并且可能为空。可能有问题吗?

我的ES版本是6.6.0

更新:

搜索期间确实发生错误,在索引期间一切正常

我对该索引的映射:
{
"development-object-1551202425": {
"mappings": {
"_doc": {
"dynamic": "false",
"properties": {
"accommodation": {
"properties": {
"badges": {
"properties": {
"maskedProp1": {
"type": "boolean"
},
"maskedProp2": {
"type": "boolean"
},
"maskedProp3": {
"type": "boolean"
},
"maskedProp4": {
"type": "boolean"
},
"maskedProp5": {
"type": "boolean"
},
"maskedProp6": {
"type": "boolean"
}
}
},
"businessTypes": {
"type": "integer"
},
"classification": {
"properties": {
"classification": {
"type": "keyword"
},
"classificationValue": {
"type": "short"
}
}
},
"endowments": {
"type": "integer"
},
"hasPrice": {
"type": "boolean"
},
"lowestPrice": {
"type": "float"
},
"metascore": {
"type": "short"
},
"rating": {
"type": "short"
},
"regionscore": {
"type": "short"
}
}
},
"certificates": {
"type": "integer"
},
"geoLocation": {
"type": "geo_point"
},
"id": {
"type": "text"
},
"isAccommodation": {
"type": "boolean"
},
"location": {
"properties": {
"maskedProp1": {
"type": "integer"
},
"maskedProp2": {
"type": "integer"
},
"id": {
"type": "integer"
},
"name": {
"type": "text",
"fielddata": true
},
"zipcodes": {
"type": "integer"
}
}
},
"maskedProp1": {
"type": "integer"
},
"maskedProp2": {
"type": "integer"
},
"description": {
"type": "text"
},
"sortTitle": {
"type": "keyword"
},
"title": {
"type": "text"
}
}
}
}
}
}

该名称由一个环境字符串(开发)和一个附加的时间戳组成(我使用自动索引切换和查询别名,它的名称为{env}-{name} -current)。

最佳答案

在我的情况下,错误是查询中的空“大小”参数,我尝试在过滤器中找到错误,但没有看到...

更详细的错误消息(至少在什么属性或设置错误发生时)可能节省数千个小时的调试时间,我想这是xD。

现在,您必须逐节分解dsl来查找问题。

关于elasticsearch - 如何使用原因 “empty String”调试 Elasticsearch 错误number_format_exception但没有字段名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54893643/

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