Skip to content

Instantly share code, notes, and snippets.

@satabin
Created March 16, 2017 10:47
Show Gist options
  • Select an option

  • Save satabin/b2ab37960fab7e7a15e949658e24b35e to your computer and use it in GitHub Desktop.

Select an option

Save satabin/b2ab37960fab7e7a15e949658e24b35e to your computer and use it in GitHub Desktop.
$ curl -d '{"fields":["offset"],"use_index":["versioner","offset"],"sort":[{"offset":"desc"}],"selector":{"offset":{"$exists":true}},"limit":1}' -H "Content-Type: application/json" http://localhost:5984/mydb/_find
{"error":"badmatch","reason":"","ref":3988992018}
{
"indexes": [
{
"ddoc": null,
"def": {
"fields": [
{
"_id": "asc"
}
]
},
"name": "_all_docs",
"type": "special"
},
{
"ddoc": "_design/versioner",
"def": {
"fields": [
{
"offset": "desc"
}
]
},
"name": "offset",
"type": "json"
}
],
"total_rows": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment