Open TomonoriSoejima opened 3 years ago
for i in $(seq 1 500); do echo "there are $i documents here" done > input file=$(cat input | tr '\n' ' ' ) printf ' { "_index": "tomo", "_type": "_doc", "_source": { "aa": "aa", "message": "%s" } }' "$file" | \ jq -c '. | { index: {_index:._index, _type:._type}}, ._source' | http -b http://localhost:9200/_bulk