January 2018
Intermediate to advanced
336 pages
7h 22m
English
We need one more big feature from the esclu command-line tool, and that’s to allow us to bulk-upload documents. Recall that in Processing Data Files Sequentially, we developed an LDJ data file containing interleaved commands and documents for Elasticsearch’s bulk API.
Here’s a truncated sample to refresh your memory:
| | {"index":{"_id":"pg11"}} |
| | {"id":11,"title":"Alice's Adventures in Wonderland","authors":...} |
| | {"index":{"_id":"pg132"}} |
| | {"id":132,"title":"The Art of War","authors":...} |
Open your index.js file and insert this new command, again before the program.parse line.
| | program |
| | .command('bulk <file>') |
| | .description('read and perform bulk options ... |
Read now
Unlock full access