Skip to content

Instantly share code, notes, and snippets.

@Akintola
Last active May 9, 2021 16:13
Show Gist options
  • Save Akintola/5ddb0fe84bbf1c3d7bbab930b9738a0f to your computer and use it in GitHub Desktop.
Save Akintola/5ddb0fe84bbf1c3d7bbab930b9738a0f to your computer and use it in GitHub Desktop.
curl -XPOST -H "Content-Type: application/json" "127.0.0.1:9200/_bulk?pretty" -d '
{ "create" : { "_index" : "mangas", "_id" : "1" } }
{ "id": "1", "title" : "One Piece", "year":1997 , "genre":["Action", "Adventure", "Comedy"] }
{ "create" : { "_index" : "mangas", "_id" : "2" } }
{ "id": "2", "title" : "Slam Dunk", "year":1990 , "genre":["Comedy", "Drama", "School"] }
{ "create" : { "_index" : "mangas", "_id" : "3" } }
{ "id": "3", "title" : "20th Century Boys", "year":1999 , "genre":["Mystery", "Drama", "Historical"] }
{ "create" : { "_index" : "mangas", "_id" : "4" } }
{ "id": "4", "title" : "Kaguya-sama: Love is War", "year":2015 , "genre":["Comedy", "Romance", "School"] }
{ "create" : { "_index" : "mangas", "_id" : "5" } }
{ "id": "5", "title" : "Kino Journey: The Beautiful World", "year":2000 , "genre":["Adventure", "Mystery","Drama"] }
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment