Created
January 8, 2014 10:38
-
-
Save toyama0919/8314849 to your computer and use it in GitHub Desktop.
elasticsearchでjsonをimportする(高速) ref: http://qiita.com/toyama0919/items/8f637794b257f9c7bbd1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http.compression: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -XPOST localhost:9200/_bulk --data-binary @requests.json > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -XPOST localhost:9200/_bulk --data-binary @<(head -n 2 requests.json) > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --compressed -H "Content-encoding: gzip" -XPOST localhost:9200/_bulk --data-binary @requests.json.gz > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --compressed -H "Content-encoding: gzip" -XPOST localhost:9200/_bulk --data-binary @requests.json.gz > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } } | |
{ "field1" : "value1" } | |
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "2" } } | |
{ "field1" : "value2" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment