gpt4 book ai didi

elasticsearch - 在Elasticsearch集群中索引文档时出错

转载 作者:行者123 更新时间:2023-12-02 22:55:26 27 4
gpt4 key购买 nike

我没有在代码中使用BulkIndex请求。

下面是用于索引文档的Jest代码。

Builder builder = new Index.Builder(source).index(indexName).type(typeName)
.id(optionalDocId == null ? UUID.randomUUID().toString() : optionalDocId);

源的数据类型是Map
Caused by: java.lang.Exception: ES Error Message while writing to raw: {"root_cause":[{"type":"remote_transport_exception","reason":"[datanodes-364022667-13-482069107.azure-ebf.opsds.cp.prod-az-westus-1.prod.us.walmart.net][10.12.10.171:9300][indices:data/write/bulk[s]]"}],"type":"es_rejected_execution_exception","reason":"rejected execution of processing of [557850852][indices:data/write/bulk[s][p]]: request: BulkShardRequest [[sceventstorev1][15]] containing [index {[SCEventStore][scevents][93adca0b-7404-4405-8f72-9fa5e32a167c], source[n/a, actual length: [2.1kb], max length: 2kb]}], target allocation id: iTbBHe7vT_ihTHdJwqVRhA, primary term: 7 on EsThreadPoolExecutor[name = datanodes-364022667-13-482069107.azure-ebf.opsds.cp.prod-az-westus-1.prod.us.walmart.net/write, queue capacity = 200, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@4d2bc57e[Running, pool size = 8, active threads = 8, queued tasks = 200, completed tasks = 148755948]]"}
给定的是索引映射。
{
"sceventstore_v1": {
"mappings": {
"scevents": {
"properties": {
"eventID": {
"type": "keyword"
},
"eventId": {
"type": "keyword"
},
"eventName": {
"type": "keyword"
},
"message": {
"type": "text"
},
"producerName": {
"type": "keyword"
},
"receivedTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"timestamp": {
"type": "date",
"format": "epoch_millis"
}
}
}
}
}
}```

最佳答案

错误消息部分清楚地说明了原因。
source[n/a, actual length: [2.1kb], max length: 2kb]}],表示您的应用程序中配置的某个位置所允许的最大长度为2kb,而您发送的最大长度超过了2.1kb。

尝试检查您的文档,看看哪个字段值超过了此限制。

可以找到更多资源https://www.elastic.co/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-clusterhttps://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html

关于elasticsearch - 在Elasticsearch集群中索引文档时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56291821/

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