ElasticSearch7.4批量匯入_bulk
curl -X POST http://localhost:9200/_bulk -H Content-Type:application/json --data-binary @D:\DevEnv\curl-7.68.0-win64-mingw\bin\xx.json
需要匯入的檔案xx.json如下:
{ "index": {"_index": "library", "_type": "book", "_id": "1"}}
{ "title": "All Quiet on the Western Front","otitle": "Im Westen nichts Neues","author": "Erich Maria Remarque","year": 1929,"characters": ["Paul Bäumer", "Albert Kropp", "Haie Westhus", "Fredrich Müller", "Stanislaus Katczinsky", "Tjaden"],"tags": ["novel"],"copies": 1, "available": true, "section" : 3}
{ "index": {"_index": "library", "_type": "book", "_id": "2"}}
{ "title": "Catch-22","author": "Joseph Heller","year": 1961,"characters": ["John Yossarian", "Captain Aardvark", "Chaplain Tappman", "Colonel Cathcart", "Doctor Daneeka"],"tags": ["novel"],"copies": 6, "available" : false, "section" : 1}
{ "index": {"_index": "library", "_type": "book", "_id": "3"}}
{ "title": "The Complete Sherlock Holmes", "author": "Arthur Conan Doyle","year": 1936,"characters": ["Sherlock Holmes","Dr. Watson", "G. Lestrade"],"tags": [],"copies": 0, "available" : false, "section" : 12}
{ "index": {"_index": "library", "_type": "book", "_id": "4"}}
{ "title": "Crime and Punishment","otitle": "Преступлéние и наказáние","author": "Fyodor Dostoevsky","year": 1886,"characters": ["Raskolnikov", "Sofia Semyonovna Marmeladova"],"tags": [],"copies": 0, "available" : true}
注意需要匯入的檔案行與行之間要以換行符相隔,如果匯入時提示出錯,請將檔案內容都歸為一行,然後每一行之間以enterEnter鍵相隔開,然後再匯入。
也可以用postman進行匯入:
相關文章
- mongodb批量操作, bulk_write,MongoDB
- 圖解JanusGraph系列 - 關於JanusGraph圖資料批量快速匯入的方案和想法(bulk load data)圖解
- 109.全文檢索-ElasticSearch-入門-刪除資料&bulk批量操作匯入樣本測試資料Elasticsearch
- MATLAB匯入txt和excel檔案技巧彙總:批量匯入、單個匯入MatlabExcel
- Python批量匯入Excel資料到MySQLPythonExcelMySql
- Laravel- 後臺批量匯入 ExcelLaravelExcel
- 【SQL】Oracle BLOB 批量匯入匯出圖片語句SQLOracle
- Elasticsearch批量匯入資料指令碼(python)Elasticsearch指令碼Python
- 使用csv批量匯入、匯出資料的需求處理
- AD 批量匯入使用者(利用 for……do……dsadd user 批量建使用者)
- 批量備份還原匯入與匯出MongoDB資料方式昝璽MongoDB
- 【轉載】QP02檢驗計劃批量匯入
- 批量匯入歷史檔案到日誌服務
- SOLIDWORKS高階BOM工具屬性匯入和批量操作Solid
- Go 呼叫 elasticsearch 批量操作介面 “/_bulk” ,提示"\n"錯誤GoElasticsearch
- Dynamics CRM 如何使用XrmToolBox中的Bulk Workflow Execution批量更新資料
- 程式設計方式實現MySQL批量匯入sql檔案程式設計MySql
- 從零開始實現放置遊戲(六):Excel批量匯入遊戲Excel
- .NET Core使用NPOI將Excel中的資料批量匯入到MySQLExcelMySql
- (方法)怎麼快速把電話號碼批量匯入通訊錄
- 基於.NetCore開發部落格專案 StarBlog - (9) 圖片批量匯入NetCore
- laravel-admin 新增,刪除,批量操作,匯入匯出,修改 等頁面按鈕 顯示與關閉Laravel
- 基於.NetCore開發部落格專案 StarBlog - (4) markdown部落格批量匯入NetCore
- Activity 流程模型匯入匯出-activity流程模型匯入匯出模型
- Elasticsearch——mget及bulkElasticsearch
- Mysql匯入&匯出MySql
- doris匯入匯出
- esayExcel匯入匯出Excel
- 批量機器登入
- sqlserver bulk insert報錯Cannot bulk load because the file could not be opened.SQLServer
- 在VNPY2的進行CTA批量回測,支援Json和Excel格式匯入策略JSONExcel
- 巧用表格模板匯入來批量查詢多個順豐快遞的物流資訊
- vue excel匯入匯出VueExcel
- navlicat 匯入匯出SQLSQL
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- MySQL入門--匯出和匯入資料MySql
- EasyExcel匯入Excel
- Angular Excel 匯入與匯出AngularExcel