繁体   English   中英

将文档插入弹性搜索

[英]Insert documents into elastic search

我在 postman 上使用 PUT http://localhost:9200/task_idx4 创建了这个索引:

{
    "settings": {
        "index": {
            "sort.field": [ "created_at", "id.raw" ],
            "sort.order": [ "desc", "desc" ]
        }
    },
    "mappings": {
        "properties": {
            "id": { "type": "wildcard", "fields": { "raw": { "type": "keyword" }}},
            "current_status": { "type": "keyword" },
            "version_rev":    { "type": "keyword" },
            "tracking_id":     { "type": "wildcard" },
            "invoice_number":  { "type": "keyword" },
            "created_at":     { "type": "date" }
        }
    }
}

我尝试使用以下方法将文档插入此索引:PUT http://localhost:9200/task_idx4/_doc

{
    "id": "xxxx",
    "current_status": "unassigned",
    "version_rev": "xxx",
    "tracking_id": "xxx",
    "invoice_number": "xxx",
    "created_at": "2021-03-23 11:00:05.054595 +00:00"
}

返回的错误是:

{
    "error": {
        "root_cause": [
            {
                "type": "cluster_block_exception",
                "reason": "index [task_idx4] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"
            }
        ],
        "type": "cluster_block_exception",
        "reason": "index [task_idx4] blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block];"
    },
    "status": 429
}

如何将文档插入到我的索引中? 谢谢

磁盘使用量超过洪水阶段水印

这里的问题是您的硬盘上没有剩余空间。

您可以使用df命令进行检查,但显然您的磁盘使用率超过 95%,因此您需要腾出一些空间(理想情况下低于 80%)才能索引数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM