小编Hef*_*faz的帖子

远程服务器返回错误:(413) 请求实体太大。弹性搜索和 JSON

我正在尝试将 JSON 文件 (263 MB) 添加到 elasticsearch。我已经使用 Kibana 为这个文件创建了一个映射,现在我正在尝试将它添加到弹性搜索中。我在 PowerShell 中运行此命令。

C:\Users\Khan> Invoke-RestMethod "http://localhost:9200/mysofindex/_bulk?pretty" -Method Post -ContentType 'application/x-ndjson' -InFile "output.json"

但这给了我一个错误。像这样:

Invoke-RestMethod : The remote server returned an error: (413) Request Entity Too Large.
At line:1 char:1
+ Invoke-RestMethod "http://localhost:9200/mysofindex/_bulk?pretty" -Me ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebE 
   xception
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Run Code Online (Sandbox Code Playgroud)

请告诉我如何解决这个问题?

powershell json elasticsearch kibana

2
推荐指数
1
解决办法
6531
查看次数

标签 统计

elasticsearch ×1

json ×1

kibana ×1

powershell ×1