Skip to content

Instantly share code, notes, and snippets.

@mikegrassotti
Created October 4, 2011 19:50
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 mikegrassotti/1262605 to your computer and use it in GitHub Desktop.
Save mikegrassotti/1262605 to your computer and use it in GitHub Desktop.
Sample blog post json
# Comment on a blog post
{ "index" : { "_index" : "activities", "_type" : "comment", "_id" : "HBASE-ACTIVITY-ID" } }
{ "aggregation_id" : "HBASE-AGGREGATION-ID",
"activity_types" : ["comment", "type2", "etc..."],
"timestamp" : "2009-11-15T14:12:12",
"content" : {
"key" : "value" #(e.g json data describing the activity - an application can use this to display the activity)
},
"user" : {
"user_id" : "red rover user id"
"tags" : ["tag1", "tag2", "etc..."]
"institution" : "name of institution"
}
"item" : {
"id" : "HBASE-ITEM-ID", # (id of the item that was acted on - for activities generated by harvesting feeds, this is the id of the feed item)
"author" : {
"user_id" : "red rover user id"
"tags" : ["tag1", "tag2", "etc..."]
"institution" : "name of institution"
}
"description" : "Maybe this is the comment text. Wait, is it title? Who knows...",
"nsfw" : "???"
"score" : "???"
"stamp" : "???"
"title" : "I am a comment."
"url" : "comment-url-goes-here"
"feed" : {
"id" : "HBASE-FEED-ID",
"description" : "feed-description"
"types" : ["type2", "type2"]
"site" : "???" #What's this?
"title" : "feed-title"
"url" : "feed-url"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment