Skip to content

Instantly share code, notes, and snippets.

@umdstu
Last active August 29, 2015 14:16
Show Gist options
  • Save umdstu/5b9c364256baaf828078 to your computer and use it in GitHub Desktop.
Save umdstu/5b9c364256baaf828078 to your computer and use it in GitHub Desktop.
.elem_match(analytics: {analytic: 'ana1'}).asc('analytics.ana1.score')
{
_id: abc,
analytics: [
{ "analytic"=> "ana1", "score": "1.0" },
{ "analytic"=> "ana2", "score": "0.76"}
],
_id: def,
analytics: [
{ "analytic"=> "ana1", "score": ".997" },
{ "analytic"=> "ana2", "score": "0.65"}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment