Skip to content

Instantly share code, notes, and snippets.

@haarts
Created February 29, 2012 10:57
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 haarts/1939980 to your computer and use it in GitHub Desktop.
Save haarts/1939980 to your computer and use it in GitHub Desktop.
ElasticSearch model evolution
//simple
{
"picture_url" : "http://foobar.com/1234",
"text" : "some text"
"user_name" : "John"
"created_at" : 2012-2-29
}
//embedded
{
"picture_url" : "http://foobar.com/1234",
"interactions" : [
{ "text" : "some other text", "user_name" : "Jane" }
{ "text" : "some text", "user_name" : "John" }
]
}
//parent/child
{
"picture_url" : "http://foobar.com/1234",
"id" : 1234
} //parent
{
"_parent" : 1234,
"text" : "some text",
"user_name" : "John"
} //child
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment