Hef*_*faz 2 powershell json elasticsearch kibana
我正在尝试将 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)
请告诉我如何解决这个问题?
您需要更改设置http.max_content_length你的elasticsearch.yml,默认值是100 MB,你将需要补充的是设置在您的配置文件,您需要的值,然后重新启动elasticsearch节点。
| 归档时间: |
|
| 查看次数: |
6531 次 |
| 最近记录: |