Skip to content

Instantly share code, notes, and snippets.

@chadkouse
Created June 5, 2013 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadkouse/5714881 to your computer and use it in GitHub Desktop.
Save chadkouse/5714881 to your computer and use it in GitHub Desktop.
Requests to elasticsearch to index a share + comments
PUT to http://host:9200/shares/share/1370441011073780507
content:
{
"artist": "Black Sabbath",
"id": "1370441011073780507",
"lyrics": "",
"song_title": "Am I Going Insane",
"media_url": "http://s3.amazonaws.com/images.tunewiki.com/shares/mobile/large/75475a5f15a0d9be76bf6822139119c0.jpg",
"has_lyric_art": true,
"has_comment": true,
"share_location_lat": null,
"share_location_long": null,
"user": "69d47803def3b32647adc17655750d63"
}
PUT to http://host:9200/shares/comment/1370441343555470541?parent=1370441011073780507
content:
{
"id": "1370441343555470541",
"user": "64ea8bf38132a2f10c6e16a6812149ca",
"text": "I know I am :-):-):-)great share !!"
}
PUT to http://host:9200/shares/comment/1370442167116839483?parent=1370441011073780507
content:
{
"id": "1370442167116839483",
"user": "6baf733cede043029ef4b1847164f80c",
"text": "#bestoftunewiki"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment