Yongqiang Qu
05/18/2025, 2:12 AMsolr post
, if I import a very large file 400MB+ with Millions of lines, it will be very hard to import the data by using CURL/HTTP requests.Alan Martini
05/18/2025, 5:45 PMparallel
like this:
parallel --block -5 -a documents.jsonl --tmpdir /tmp --pipepart --cat \
'curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -X POST -T {} \
<http://localhost:8108/collections/><collection>/documents/import?action=create'
This splits the input file into 5MB chunks and streams them concurrently to the import endpoint.
More on the available import options here:
https://typesense.org/docs/28.0/api/documents.html#import-a-jsonl-file