You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by bryan rasmussen <ra...@gmail.com> on 2011/09/02 16:40:15 UTC

complex keys, startkey_docid problems

Hi, I'm trying to make pagination as I see so many before me have tried.
I am returning rows like the following:


{"total_rows":16416,"offset":0,"rows":[
{"id":"e4ca6ead04c3bef1aebb090a6c0012bf","key":["1314785463217","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c0012bf","_rev":"1-38323bcdc91d2ca2a500877d64e853f0","tags":["mac","
proto-applications"," proto-community","
administration"],"urls":["http://code.google.com/p/munki/"],"name":"Munki
- managed software installs on mac","desc":"munki is a set of tools
that, used together with a webserver-based repository of packages and
package metadata, can be used by OS X administrators to manage
software installs (and in many cases removals) on OS X client
machines. ","user":"pantagruel","type":"bookmark","timestamp":"1314785463217","private":"true"}},
{"id":"e4ca6ead04c3bef1aebb090a6c000db9","key":["1314781849543","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000db9","_rev":"1-b34ebc8019a13af35743e9620846ed68","tags":["sleepproject"],"urls":["http://www.kk.org/cooltools/phone-band.png"],"name":"wakemate
sleep tracker","desc":"wakes you at optimal moment in sleep based on
actigraphy, iphone app
included","user":"pantagruel","type":"bookmark","timestamp":"1314781849543","private":"true"}},
{"id":"e4ca6ead04c3bef1aebb090a6c000736","key":["1314781724733","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000736","_rev":"1-3277bd60018d2e7a83bae34fcbc5c591","tags":["crafts","
furniture"," todo"],"urls":["http://blog.craftzine.com/archive/2011/08/how-to_custom_crafting_table.html"],"name":"How
To: Custom Crafting table","desc":"Guy made custom crafting table for
girlfriend","user":"pantagruel","type":"bookmark","timestamp":"1314781724733","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920008d83","key":["1314711957931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920008d83","_rev":"1-d1dd06602439909ca75cf86477304bfc","tags":["proto-community","
javascript"," security"],"urls":["http://cryptico.wwwtyro.net/"],"name":"simple
encryption with js","desc":"rsa
security","user":"pantagruel","type":"bookmark","timestamp":"1314711957931","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920005685","key":["1314688754986","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005685","_rev":"1-e20377028240f791a49699c9ef776d75","tags":["node","
windows"," iis"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/1fmcPzcG6bc/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx"],"name":"Scott
Hanselman","desc":"node.js on iis.
","user":"pantagruel","type":"bookmark","timestamp":"1314688754986","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920005543","key":["1314688717931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005543","_rev":"1-b6eb3e86a0ced070b430899dfb91e1b3","tags":["javascript","
concurrent"," .net","
asynchronous"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/LAMDcMD5Yfw/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx"],"name":"Scott
Hanselman","desc":"Ive been spending some time exploring asynchrony
and scale recently.","user":"pantagruel","type":"bookmark","timestamp":"1314688717931","private":"true"}},
{"id":"78dfedabf05d09dec2efd3492000553d","key":["1314623313554","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd3492000553d","_rev":"1-a71f9e8c3a843879457bcf4c3fa61005","tags":["igprojects","
computerscience"],"urls":["http://www.cs4fn.org/magic/"],"name":"The
Magic of Computer Science","desc":"Computer science with a view to
illusionism","user":"pantagruel","type":"bookmark","timestamp":"1314623313554","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920004d90","key":["1314622687423","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004d90","_rev":"1-2f352d7fb03e2507c5730819a0104de8","tags":["graphics","
programming"," python","
rasmus"],"urls":["http://www.disneyanimation.com/technology/opensource.html"],"name":"Walt
Disneys Open Source","desc":"Disney open source
code","user":"pantagruel","type":"bookmark","timestamp":"1314622687423","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920004a0a","key":["1314612540556","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004a0a","_rev":"1-e3abcc9faccc309b85ba19c6abe66488","tags":["python","
database"," validation"],"urls":["http://namlook.github.com/mongokit/"],"name":"MongoKit","desc":"MongoKit
is a python module that brings structured schema and validation layer
on top of the great pymongo driver. It has be written to be simpler
and lighter as possible with the KISS and DRY principles in
mind.","user":"pantagruel","type":"bookmark","timestamp":"1314612540556","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920003cd0","key":["1314612484796","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003cd0","_rev":"1-7d7bf3a2abf32e9603a15a4728e42e81","tags":["business"],"urls":["http://feedproxy.google.com/~r/boingboing/iBag/~3/hhmmaF8lEjI/stalwart-workers-neglected-backbone-of-the-firm.html"],"name":"Boing
Boing","desc":"Writing in a Harvard Business Review blog, professor
Thomas J. DeLong talks about Stalwart Workers, a neglected part of the
...","user":"pantagruel","type":"bookmark","timestamp":"1314612484796","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920003070","key":["1314610839221","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003070","_rev":"1-baa7308bcd05a775b47a53bbec1ad355","tags":["statistics","
books"],"urls":["http://greenteapress.com/thinkstats/html/index.html"],"name":"Think
Stats","desc":"Probability and Statistics for
Programmers","user":"pantagruel","type":"bookmark","timestamp":"1314610839221","private":"true"}},
{"id":"78dfedabf05d09dec2efd34920001477","key":["1314603808566","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920001477","_rev":"1-18b915268f4d2b32e19db6001f447a56","tags":["graphics","
art"," igprojects"],"urls":["http://www.etsy.com/shop/alternatehistories"],"name":"prints
of ufos etc. in old paintings on etsy","desc":"prints of ufos etc. in
old paintings on
etsy","user":"pantagruel","type":"bookmark","timestamp":"1314603808566","private":"true"}},
{"id":"21d06bd703f5156277c16eb8310019e3","key":["1314210710636","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310019e3","_rev":"2-b6f02a113dc9137851371d8449ac2511","tags":["scalability","
mmx"],"urls":["http://highscalability.com/blog/2011/8/22/strategy-run-a-scalable-available-and-cheap-static-site-on-s.html"],"name":"Strategy:
Run a Scalable, Available, and Cheap Static Site on S3 or
GitHub","user":"pantagruel","type":"bookmark","timestamp":"1314210710636","private":"true","desc":"Werner
Vogels, chronicling his experience of transforming his All Things
Distributed blog into a static site using S3s ability to serve web
pages"}},
{"id":"21d06bd703f5156277c16eb831001919","key":["1314209004585","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb831001919","_rev":"2-d808ee1c6efdd122c411776a723fbdf3","tags":["proto-community","
mmx"],"urls":["http://jeffkreeftmeijer.com/2011/introducing-tapir-simple-search-for-static-sites/"],"name":"Introducing
Tapir","user":"pantagruel","type":"bookmark","timestamp":"1314209004585","private":"true","desc":"Tapir
is a simple application that indexes your RSS feed and uses Tire
(which is powered by Elasticsearch, which is powered by Lucene) to
index and search it. It gives you a straightforward JSON API that
returns the results."}},
{"id":"21d06bd703f5156277c16eb8310005ae","key":["1314102233143","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310005ae","_rev":"1-6b5142b91b05c0da179563db0c4e6527","tags":["audio","
google"],"urls":["http://googlesystem.blogspot.com/2011/08/music-rich-snippets-in-google-search.html"],"name":"Music
Rich Snippets in
Google","description":"","user":"pantagruel","type":"bookmark","timestamp":"1314102233143","private":"true"}},
{"id":"2ba97738fea2a8ae0f1b316c64923886","key":[1313615038000,"pantagruel"],"value":{"_id":"2ba97738fea2a8ae0f1b316c64923886","_rev":"5-78d666f665ac309a81f8d392f33f5492","type":"bookmark","user":"pantagruel","desc":"The
Web Is a Customer Service Medium
(Ftrain.com)","datetime":"2011-08-17T21:03:58Z","urls":"http://www.ftrain.com/wwic.html","private":false,"tags":["businessideas","thomson"],"_deleted_conflicts":["2-c70c0f9ef0b01573e4203e4314681f0a"]}},
{"id":"2f6b1522f93d96b9d1f482eacfa58895","key":[1313586111000,"pantagruel"],"value":{"_id":"2f6b1522f93d96b9d1f482eacfa58895","_rev":"3-bd80884dc94604efbfe50c7beac8f320","type":"bookmark","user":"pantagruel","desc":"Berkelium:","datetime":"2011-08-17T13:01:51Z","urls":"http://berkelium.org/","private":false,"tags":["proto-applications"]}},
{"id":"291192e7b314d1e89412cd13b6dadb7e","key":[1313585931000,"pantagruel"],"value":{"_id":"291192e7b314d1e89412cd13b6dadb7e","_rev":"1-b18ff85d0a1cd6abeb5975424360f1a4","type":"bookmark","user":"pantagruel","desc":"Tablib:
Pythonic Tabular Datasets \u0097 Tablib v0.9.11
documentation","datetime":"2011-08-17T12:58:51Z","urls":"http://docs.tablib.org/en/latest/index.html","private":false,"tags":["data","python","programminglibrary"]}},
{"id":"47c7cde7b8b70a5db0ad8bbcb962cac2","key":[1313579773000,"pantagruel"],"value":{"_id":"47c7cde7b8b70a5db0ad8bbcb962cac2","_rev":"3-b48b2888574255f114a66edf4806d6b1","type":"bookmark","user":"pantagruel","desc":"Plask","datetime":"2011-08-17T11:16:13Z","urls":"http://www.plask.org/","private":false,"tags":["graphics","mac","programming"]}},
{"id":"79a5fd984a8ec8850ed4aa0860f330d0","key":[1313579305000,"pantagruel"],"value":{"_id":"79a5fd984a8ec8850ed4aa0860f330d0","_rev":"3-b3d076639c33c1112b60bb7dc0a7d5e2","type":"bookmark","user":"pantagruel","desc":"It
does one thing and it does it well. |
MetaFilter","datetime":"2011-08-17T11:08:25Z","urls":"http://www.metafilter.com/106567/It-does-one-thing-and-it-does-it-well","private":false,"tags":["tools","proto-applications"]}},
{"id":"b05611b60b3404a5d6139f80609de620","key":[1313567910000,"pantagruel"],"value":{"_id":"b05611b60b3404a5d6139f80609de620","_rev":"3-660498c09352d5dbae70bf2abbcc7f1b","type":"bookmark","user":"pantagruel","desc":"spherical
lightshades of various sorts made from everyday objects - playiing
cards, train tickets
etc.","datetime":"2011-08-17T07:58:30Z","urls":"http://www.flickr.com/photos/nicksayers/4319867051/","private":false,"tags":["lighting","origami"]}},
{"id":"6702af5247e703b2be832098b2c7daf7","key":[1313494859000,"pantagruel"],"value":{"_id":"6702af5247e703b2be832098b2c7daf7","_rev":"1-c44b734cc3366045b0a940d61f56ce31","type":"bookmark","user":"pantagruel","desc":"Restarting
Node.js When Your Source Changes - Christopher Bennage - Devlicio.us -
Just the Tasty

Bits","datetime":"2011-08-16T11:40:59Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/08/09/restarting-node-js-when-your-source-changes.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node","tools:development"]}},
{"id":"95e73cbb9288dc8d9323ecdb22f5e8a2","key":[1313494650000,"pantagruel"],"value":{"_id":"95e73cbb9288dc8d9323ecdb22f5e8a2","_rev":"1-4bea5cffa62d12298a741b7dd88a496d","type":"bookmark","user":"pantagruel","desc":"rewrite
bits of url template, couchdb
loading","datetime":"2011-08-16T11:37:30Z","urls":"http://msdn.microsoft.com/en-us/scriptjunkie/gg723713","private":false,"tags":["proto-community","javascript","code"]}},
{"id":"f255a93d4b7f32d080a43d0d58d76e5c","key":[1313494545000,"pantagruel"],"value":{"_id":"f255a93d4b7f32d080a43d0d58d76e5c","_rev":"1-3a5ad41a9f28410af31459a9566ecd1d","type":"bookmark","user":"pantagruel","desc":"The
Shapes of CSS","datetime":"2011-08-16T11:35:45Z","urls":"http://css-tricks.com/examples/ShapesOfCSS/","private":false,"tags":["css","code"]}},
{"id":"2f89a3f8052eb93596c377fcf291826b","key":[1313494428000,"pantagruel"],"value":{"_id":"2f89a3f8052eb93596c377fcf291826b","_rev":"1-da045cffcd808b68fa51cbccc3486631","type":"bookmark","user":"pantagruel","desc":"pjscrape:
A web-scraping framework written in Javascript, using PhantomJS and
jQuery","datetime":"2011-08-16T11:33:48Z","urls":"http://nrabinowitz.github.com/pjscrape/?utm_source=twitterfeed&utm_medium=twitter","private":false,"tags":["javascript","proto-applications"]}},
{"id":"6e4c4b61a018dc2ba77198c422bc6532","key":[1313492816000,"pantagruel"],"value":{"_id":"6e4c4b61a018dc2ba77198c422bc6532","_rev":"1-cee0375e7980d78577aa306ad088bac2","type":"bookmark","user":"pantagruel","desc":"List
of Algorithms","datetime":"2011-08-16T11:06:56Z","urls":"http://www.scriptol.com/programming/list-algorithms.php","private":false,"tags":["algorithms"]}},
{"id":"4645ba14e94f19db9fe88dcc0384248e","key":[1313492787000,"pantagruel"],"value":{"_id":"4645ba14e94f19db9fe88dcc0384248e","_rev":"1-b9146f0b9e80e74794c329198d11bb82","type":"bookmark","user":"pantagruel","desc":"Amazing
algorithms to enhance or transform
images","datetime":"2011-08-16T11:06:27Z","urls":"http://www.scriptol.com/programming/graphic-algorithms.php","private":false,"tags":["graphics","programming","proto-applications"]}},
{"id":"4a1bfe802fc97b0eee1dbaeadd792524","key":[1313492746000,"pantagruel"],"value":{"_id":"4a1bfe802fc97b0eee1dbaeadd792524","_rev":"1-484607ac9cfea85f9c3745f51ce0767a","type":"bookmark","user":"pantagruel","desc":"D3
for Mere Mortals","datetime":"2011-08-16T11:05:46Z","urls":"http://www.recursion.org/d3-for-mere-mortals/","private":false,"tags":["svg","graphs","graphsproject","graphics","javascript","code"]}},
{"id":"97bd4002f3c131c0a27224ff5ab54962","key":[1313492433000,"pantagruel"],"value":{"_id":"97bd4002f3c131c0a27224ff5ab54962","_rev":"1-9358afd81d6106747425f41c210773b8","type":"bookmark","user":"pantagruel","desc":"Fixing
the JavaScript typeof operator \u00ab JavaScript,
JavaScript\u0085","datetime":"2011-08-16T11:00:33Z","urls":"http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/","private":false,"tags":["javascript","code"]}},
{"id":"ae520bb3199bc5278472db70026227a6","key":[1313492392000,"pantagruel"],"value":{"_id":"ae520bb3199bc5278472db70026227a6","_rev":"1-0d1060f1263b48541f2dde201718eea2","type":"bookmark","user":"pantagruel","desc":"31
days of Canvas tutorials |
CreativeJS","datetime":"2011-08-16T10:59:52Z","urls":"http://creativejs.com/2011/08/31-days-of-canvas-tutorials/","private":false,"tags":["canvas","tutorials"]}},
{"id":"3a12eb5cf3c99b86d297359addd5c2e6","key":[1313011517000,"pantagruel"],"value":{"_id":"3a12eb5cf3c99b86d297359addd5c2e6","_rev":"1-0ab9a437419fded98b1523edddc60b74","type":"bookmark","user":"pantagruel","desc":"Steven
Frank: Programming for Mere
Mortals","datetime":"2011-08-10T21:25:17Z","urls":"http://stevenf.com/pages/book.html","private":false,"tags":["books"]}},
{"id":"39bb27a174c718515371fb285692e127","key":[1313011397000,"pantagruel"],"value":{"_id":"39bb27a174c718515371fb285692e127","_rev":"1-31b4db2c7b719957f39042e0c9ac90dc","type":"bookmark","user":"pantagruel","desc":"SNAP:
Stanford Network Analysis
Platform","datetime":"2011-08-10T21:23:17Z","urls":"http://snap.stanford.edu/snap/","private":false,"tags":["graphs","analysis","network"]}},
{"id":"1f917619a292d30bc720fb782395be2d","key":[1312925609000,"pantagruel"],"value":{"_id":"1f917619a292d30bc720fb782395be2d","_rev":"1-1b6b9854c4aad8fd598a1f852a4a69f9","type":"bookmark","user":"pantagruel","desc":"Dead
Reckonings \u00bb The Art of Nomography I: Geometric
Design","datetime":"2011-08-09T21:33:29Z","urls":"http://myreckonings.com/wordpress/2008/01/09/the-art-of-nomography-i-geometric-design","private":false,"tags":["visualization","math","graphics","graphs"]}},
{"id":"fad2013fa0a8f3fb25b32c7e5bd54c86","key":[1312925581000,"pantagruel"],"value":{"_id":"fad2013fa0a8f3fb25b32c7e5bd54c86","_rev":"1-2f6843f530ff9b3631a4bf40dfcf762e","type":"bookmark","user":"pantagruel","desc":"mnot\u0092s
blog: On HTTP Load
Testing","datetime":"2011-08-09T21:33:01Z","urls":"http://www.mnot.net/blog/2011/05/18/http_benchmark_rules","private":false,"tags":["performance","testing"]}},
{"id":"987896224cc633b541fa44bd02cec9d2","key":[1312789590000,"pantagruel"],"value":{"_id":"987896224cc633b541fa44bd02cec9d2","_rev":"1-ee67a20bc8edd0c6132787b07fac2305","type":"bookmark","user":"pantagruel","desc":"pubsubhubbub
- A simple, open, web-hook-based pubsub protocol & open source
reference implementation. - Google Project
Hosting","datetime":"2011-08-08T07:46:30Z","urls":"http://code.google.com/p/pubsubhubbub/","private":false,"tags":["proto-community"]}},
{"id":"93b4fbc0a51385f810dbf3138a5a5963","key":[1312736772000,"pantagruel"],"value":{"_id":"93b4fbc0a51385f810dbf3138a5a5963","_rev":"1-9f11036ae95834ded058d1ddff6840e1","type":"bookmark","user":"pantagruel","desc":"MAKE
| Stereo Panel Controls Bonkers Living Room Lighting
Scheme","datetime":"2011-08-07T17:06:12Z","urls":"http://blog.makezine.com/archive/2011/08/stereo-panel-controls-bonkers-living-room-lighting-scheme.html","private":false,"tags":["diy","lighting","automation"]}},
{"id":"1bfa04421ea8c0bd9635a7db9572cbfd","key":[1312736715000,"pantagruel"],"value":{"_id":"1bfa04421ea8c0bd9635a7db9572cbfd","_rev":"1-c90b97eaf514dbdb95d1649452c56173","type":"bookmark","user":"pantagruel","desc":"Neu!
'75 | MetaFilter","datetime":"2011-08-07T17:05:15Z","urls":"http://www.metafilter.com/106287/Neu-75","private":false,"tags":["music"]}},
{"id":"6ce5e1c31c2aeec7d105d4429fc59ef1","key":[1312723198000,"pantagruel"],"value":{"_id":"6ce5e1c31c2aeec7d105d4429fc59ef1","_rev":"1-0b9f2377595ba5705dea39764a4e6b79","type":"bookmark","user":"pantagruel","desc":"Cyberwar
| MetaFilter","datetime":"2011-08-07T13:19:58Z","urls":"http://www.metafilter.com/106258/Cyberwar","private":false,"tags":["security","crime","writing"]}},
{"id":"a3bbf1b1dc0b96a6ab50ae072d585005","key":[1312717703000,"pantagruel"],"value":{"_id":"a3bbf1b1dc0b96a6ab50ae072d585005","_rev":"1-632dd0bca2618849b9182b4f4096d532","type":"bookmark","user":"pantagruel","desc":"Main
\u00a7 Digital Atlas of Roman and Medieval
Civilization","datetime":"2011-08-07T11:48:23Z","urls":"http://medievalmap.harvard.edu/icb/icb.do?keyword=k40248&tabgroupid=icb.tabgroup53584","private":false,"tags":["resources","igprojects","phantaz","writing"]}},
{"id":"ca6ba808fd97885bdce430dc72a0536e","key":[1312709056000,"pantagruel"],"value":{"_id":"ca6ba808fd97885bdce430dc72a0536e","_rev":"1-39bb45de310f43b903fbd999e93ac44b","type":"bookmark","user":"pantagruel","desc":"You
Got The Love | MetaFilter","datetime":"2011-08-07T09:24:16Z","urls":"http://www.metafilter.com/106274/You-Got-The-Love","private":false,"tags":["music"]}},
{"id":"8968ca7322577989f11b4c91d0f2e6f4","key":[1312707581000,"pantagruel"],"value":{"_id":"8968ca7322577989f11b4c91d0f2e6f4","_rev":"1-b386c153c42b84f37260657a13e17564","type":"bookmark","user":"pantagruel","desc":"JSTOR:
fascist aesthetics","datetime":"2011-08-07T08:59:41Z","urls":"http://www.jstor.org/pss/261165","private":false,"tags":["design","igprojects"]}},
{"id":"ae734941c67c0afe6bbead1f1e06258f","key":[1312669296000,"pantagruel"],"value":{"_id":"ae734941c67c0afe6bbead1f1e06258f","_rev":"1-81aa72e2d55c5a26f36829f119e792e6","type":"bookmark","user":"pantagruel","desc":"Introduction
to Artificial Intelligence - Fall
2011","datetime":"2011-08-06T22:21:36Z","urls":"http://www.ai-class.com/","private":false,"tags":["education"]}},
{"id":"f8da1a58b5df5aac4c177b5b35ee2da2","key":[1312669280000,"pantagruel"],"value":{"_id":"f8da1a58b5df5aac4c177b5b35ee2da2","_rev":"1-21fcd30e18deee5f67f91790ef903bec","type":"bookmark","user":"pantagruel","desc":"Math
interview podcast |
MetaFilter","datetime":"2011-08-06T22:21:20Z","urls":"http://www.metafilter.com/106252/Math-interview-podcast","private":false,"tags":["math"]}},
{"id":"9cee84c163a1fa3a060b7b552bd6625c","key":[1312668878000,"pantagruel"],"value":{"_id":"9cee84c163a1fa3a060b7b552bd6625c","_rev":"1-f0990ab365c91218e9a4fc4582f7ac09","type":"bookmark","user":"pantagruel","desc":"Neil
Fraser: Writing: Differential
Synchronization","datetime":"2011-08-06T22:14:38Z","urls":"http://neil.fraser.name/writing/sync/","private":false,"tags":["algorithms"]}},
{"id":"8dad181d5c9d30c29f3481e34e1bfc84","key":[1312661874000,"pantagruel"],"value":{"_id":"8dad181d5c9d30c29f3481e34e1bfc84","_rev":"1-3a800cba8606d2762e201e67e240bd6c","type":"bookmark","user":"pantagruel","desc":"NounProject","datetime":"2011-08-06T20:17:54Z","urls":"http://thenounproject.com/","private":false,"tags":["graphics","proto-community","design","resources"]}},
{"id":"867081f73184f086b37574b5e7d85897","key":[1312661806000,"pantagruel"],"value":{"_id":"867081f73184f086b37574b5e7d85897","_rev":"1-e433eb5ea676974c680110f7c4f0d94b","type":"bookmark","user":"pantagruel","desc":"Node.js
on Windows (or JavaScript for the backend) - Christopher Bennage -
Devlicio.us - Just the Tasty
Bits","datetime":"2011-08-06T20:16:46Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/07/28/node-js-on-windows.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node"]}},
{"id":"8c379a8e14fac821aa47f08ef9eca802","key":[1312661717000,"pantagruel"],"value":{"_id":"8c379a8e14fac821aa47f08ef9eca802","_rev":"1-fc556ad7b802e0425054daf263f2e3ab","type":"bookmark","user":"pantagruel","desc":"templating","datetime":"2011-08-06T20:15:17Z","urls":"http://net.tutsplus.com/tutorials/javascript-ajax/into-the-ring-with-knockout-js/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29","private":false,"tags":["proto-community","code","javascript"]}},
{"id":"5c5771b29846c2bfb708f78ab3435b51","key":[1312414365000,"pantagruel"],"value":{"_id":"5c5771b29846c2bfb708f78ab3435b51","_rev":"1-e7f9d8502ac83f4d43721331c2d25901","type":"bookmark","user":"pantagruel","desc":"Apps
vs the Web \u00bb Matt Legend
Gemmell","datetime":"2011-08-03T23:32:45Z","urls":"http://mattgemmell.com/2011/07/22/apps-vs-the-web","private":false,"tags":["programming","iphone","ipad"]}},
{"id":"e618801b9dc1be7862fc7465999add66","key":[1312414295000,"pantagruel"],"value":{"_id":"e618801b9dc1be7862fc7465999add66","_rev":"1-d6752031884be850a488176fbe700a09","type":"bookmark","user":"pantagruel","desc":"blog.mobilephonesecurity.org:
Voicemail hacking and the 'phone hacking' scandal - how it worked,
questions to be asked and improvements to be
made","datetime":"2011-08-03T23:31:35Z","urls":"http://blog.mobilephonesecurity.org/2011/07/voicemail-hacking-and-phone-hacking.html","private":false,"tags":["security"]}},
{"id":"9420730ad098efc91c44ea59553e6af3","key":[1312413443000,"pantagruel"],"value":{"_id":"9420730ad098efc91c44ea59553e6af3","_rev":"1-c892a9af2e83d6d3b909aef27686ab0b","type":"bookmark","user":"pantagruel","desc":"PhoneGap","datetime":"2011-08-03T23:17:23Z","urls":"http://www.phonegap.com/","private":false,"tags":["iphone","programming","apis"]}}
]}

with the url

bookmarksByUserWithTimestamp?limit=50&descending=true&endKey=%22pantagruel%22

that's fine. it's what I want
but when I do the following

bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"

I get the same document.

When I do the following
bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"&startkey_docid=9420730ad098efc91c44ea59553e6af3
I also get the same, the same if I skip the startKey parameter altogether

What I want obviously is to start returning documents from id
9420730ad098efc91c44ea59553e6af3
how do I do that while still maintaining the descending=true order of
my results?

Thanks,
Bryan Rasmussen

Re: complex keys, startkey_docid problems

Posted by Jim Klo <ji...@sri.com>.
I also ran into a similar issue...  One thing I discovered is that.. with startkey_docid is for dealing with non-unique keys:

So if your view had:
[
{ "_id":"111", "key":[1312413443000,"pantagruel"],"value": "a" },
{ "_id":"222", "key":[1312413443000,"pantagruel"],"value": "b" },
{ "_id":"333", "key":[1312413443000,"pantagruel"],"value": "c" },
{ "_id":"444", "key":[1312413443000,"pantagruel"],"value": "d" },
{ "_id":"555", "key":[1312413443000,"pantagruel"],"value": "e" },
{ "_id":"666", "key":[1312413443000,"pantagruel"],"value": "f" },
]

if you wanted to start returning docs at "_id":"333", you'll want to use: startkey=[1312413443000,"pantagruel"]&startkey_docid=333

essentially the startkey_docid has to match with the right key emited in the view...

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International




On Sep 2, 2011, at 9:37 AM, bryan rasmussen wrote:

> Ok thanks,
> Bryan Rasmussen
> 
> On Fri, Sep 2, 2011 at 5:50 PM, Robert Newson <rn...@apache.org> wrote:
>> A couple of things;
>> 
>> 1) It's 'startkey' not 'startKey', ditto for 'endkey'.
>> 2) array keys are not 'complex', they just sort later than strings and numbers.
>> 3) you can only do contiguous ranges. e.g,
>> ?startkey=["1314785463217"]&endkey=["1314785463217",{}] would find all
>> keys where the first item is "1314785463217".
>> 
>> More here: http://wiki.apache.org/couchdb/View_collation
>> 
>> B.
>> 
>> On 2 September 2011 15:40, bryan rasmussen <ra...@gmail.com> wrote:
>>> Hi, I'm trying to make pagination as I see so many before me have tried.
>>> I am returning rows like the following:
>>> 
>>> 
>>> {"total_rows":16416,"offset":0,"rows":[
>>> {"id":"e4ca6ead04c3bef1aebb090a6c0012bf","key":["1314785463217","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c0012bf","_rev":"1-38323bcdc91d2ca2a500877d64e853f0","tags":["mac","
>>> proto-applications"," proto-community","
>>> administration"],"urls":["http://code.google.com/p/munki/"],"name":"Munki
>>> - managed software installs on mac","desc":"munki is a set of tools
>>> that, used together with a webserver-based repository of packages and
>>> package metadata, can be used by OS X administrators to manage
>>> software installs (and in many cases removals) on OS X client
>>> machines. ","user":"pantagruel","type":"bookmark","timestamp":"1314785463217","private":"true"}},
>>> {"id":"e4ca6ead04c3bef1aebb090a6c000db9","key":["1314781849543","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000db9","_rev":"1-b34ebc8019a13af35743e9620846ed68","tags":["sleepproject"],"urls":["http://www.kk.org/cooltools/phone-band.png"],"name":"wakemate
>>> sleep tracker","desc":"wakes you at optimal moment in sleep based on
>>> actigraphy, iphone app
>>> included","user":"pantagruel","type":"bookmark","timestamp":"1314781849543","private":"true"}},
>>> {"id":"e4ca6ead04c3bef1aebb090a6c000736","key":["1314781724733","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000736","_rev":"1-3277bd60018d2e7a83bae34fcbc5c591","tags":["crafts","
>>> furniture"," todo"],"urls":["http://blog.craftzine.com/archive/2011/08/how-to_custom_crafting_table.html"],"name":"How
>>> To: Custom Crafting table","desc":"Guy made custom crafting table for
>>> girlfriend","user":"pantagruel","type":"bookmark","timestamp":"1314781724733","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920008d83","key":["1314711957931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920008d83","_rev":"1-d1dd06602439909ca75cf86477304bfc","tags":["proto-community","
>>> javascript"," security"],"urls":["http://cryptico.wwwtyro.net/"],"name":"simple
>>> encryption with js","desc":"rsa
>>> security","user":"pantagruel","type":"bookmark","timestamp":"1314711957931","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920005685","key":["1314688754986","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005685","_rev":"1-e20377028240f791a49699c9ef776d75","tags":["node","
>>> windows"," iis"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/1fmcPzcG6bc/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx"],"name":"Scott
>>> Hanselman","desc":"node.js on iis.
>>> ","user":"pantagruel","type":"bookmark","timestamp":"1314688754986","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920005543","key":["1314688717931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005543","_rev":"1-b6eb3e86a0ced070b430899dfb91e1b3","tags":["javascript","
>>> concurrent"," .net","
>>> asynchronous"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/LAMDcMD5Yfw/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx"],"name":"Scott
>>> Hanselman","desc":"Ive been spending some time exploring asynchrony
>>> and scale recently.","user":"pantagruel","type":"bookmark","timestamp":"1314688717931","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd3492000553d","key":["1314623313554","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd3492000553d","_rev":"1-a71f9e8c3a843879457bcf4c3fa61005","tags":["igprojects","
>>> computerscience"],"urls":["http://www.cs4fn.org/magic/"],"name":"The
>>> Magic of Computer Science","desc":"Computer science with a view to
>>> illusionism","user":"pantagruel","type":"bookmark","timestamp":"1314623313554","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920004d90","key":["1314622687423","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004d90","_rev":"1-2f352d7fb03e2507c5730819a0104de8","tags":["graphics","
>>> programming"," python","
>>> rasmus"],"urls":["http://www.disneyanimation.com/technology/opensource.html"],"name":"Walt
>>> Disneys Open Source","desc":"Disney open source
>>> code","user":"pantagruel","type":"bookmark","timestamp":"1314622687423","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920004a0a","key":["1314612540556","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004a0a","_rev":"1-e3abcc9faccc309b85ba19c6abe66488","tags":["python","
>>> database"," validation"],"urls":["http://namlook.github.com/mongokit/"],"name":"MongoKit","desc":"MongoKit
>>> is a python module that brings structured schema and validation layer
>>> on top of the great pymongo driver. It has be written to be simpler
>>> and lighter as possible with the KISS and DRY principles in
>>> mind.","user":"pantagruel","type":"bookmark","timestamp":"1314612540556","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920003cd0","key":["1314612484796","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003cd0","_rev":"1-7d7bf3a2abf32e9603a15a4728e42e81","tags":["business"],"urls":["http://feedproxy.google.com/~r/boingboing/iBag/~3/hhmmaF8lEjI/stalwart-workers-neglected-backbone-of-the-firm.html"],"name":"Boing
>>> Boing","desc":"Writing in a Harvard Business Review blog, professor
>>> Thomas J. DeLong talks about Stalwart Workers, a neglected part of the
>>> ...","user":"pantagruel","type":"bookmark","timestamp":"1314612484796","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920003070","key":["1314610839221","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003070","_rev":"1-baa7308bcd05a775b47a53bbec1ad355","tags":["statistics","
>>> books"],"urls":["http://greenteapress.com/thinkstats/html/index.html"],"name":"Think
>>> Stats","desc":"Probability and Statistics for
>>> Programmers","user":"pantagruel","type":"bookmark","timestamp":"1314610839221","private":"true"}},
>>> {"id":"78dfedabf05d09dec2efd34920001477","key":["1314603808566","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920001477","_rev":"1-18b915268f4d2b32e19db6001f447a56","tags":["graphics","
>>> art"," igprojects"],"urls":["http://www.etsy.com/shop/alternatehistories"],"name":"prints
>>> of ufos etc. in old paintings on etsy","desc":"prints of ufos etc. in
>>> old paintings on
>>> etsy","user":"pantagruel","type":"bookmark","timestamp":"1314603808566","private":"true"}},
>>> {"id":"21d06bd703f5156277c16eb8310019e3","key":["1314210710636","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310019e3","_rev":"2-b6f02a113dc9137851371d8449ac2511","tags":["scalability","
>>> mmx"],"urls":["http://highscalability.com/blog/2011/8/22/strategy-run-a-scalable-available-and-cheap-static-site-on-s.html"],"name":"Strategy:
>>> Run a Scalable, Available, and Cheap Static Site on S3 or
>>> GitHub","user":"pantagruel","type":"bookmark","timestamp":"1314210710636","private":"true","desc":"Werner
>>> Vogels, chronicling his experience of transforming his All Things
>>> Distributed blog into a static site using S3s ability to serve web
>>> pages"}},
>>> {"id":"21d06bd703f5156277c16eb831001919","key":["1314209004585","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb831001919","_rev":"2-d808ee1c6efdd122c411776a723fbdf3","tags":["proto-community","
>>> mmx"],"urls":["http://jeffkreeftmeijer.com/2011/introducing-tapir-simple-search-for-static-sites/"],"name":"Introducing
>>> Tapir","user":"pantagruel","type":"bookmark","timestamp":"1314209004585","private":"true","desc":"Tapir
>>> is a simple application that indexes your RSS feed and uses Tire
>>> (which is powered by Elasticsearch, which is powered by Lucene) to
>>> index and search it. It gives you a straightforward JSON API that
>>> returns the results."}},
>>> {"id":"21d06bd703f5156277c16eb8310005ae","key":["1314102233143","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310005ae","_rev":"1-6b5142b91b05c0da179563db0c4e6527","tags":["audio","
>>> google"],"urls":["http://googlesystem.blogspot.com/2011/08/music-rich-snippets-in-google-search.html"],"name":"Music
>>> Rich Snippets in
>>> Google","description":"","user":"pantagruel","type":"bookmark","timestamp":"1314102233143","private":"true"}},
>>> {"id":"2ba97738fea2a8ae0f1b316c64923886","key":[1313615038000,"pantagruel"],"value":{"_id":"2ba97738fea2a8ae0f1b316c64923886","_rev":"5-78d666f665ac309a81f8d392f33f5492","type":"bookmark","user":"pantagruel","desc":"The
>>> Web Is a Customer Service Medium
>>> (Ftrain.com)","datetime":"2011-08-17T21:03:58Z","urls":"http://www.ftrain.com/wwic.html","private":false,"tags":["businessideas","thomson"],"_deleted_conflicts":["2-c70c0f9ef0b01573e4203e4314681f0a"]}},
>>> {"id":"2f6b1522f93d96b9d1f482eacfa58895","key":[1313586111000,"pantagruel"],"value":{"_id":"2f6b1522f93d96b9d1f482eacfa58895","_rev":"3-bd80884dc94604efbfe50c7beac8f320","type":"bookmark","user":"pantagruel","desc":"Berkelium:","datetime":"2011-08-17T13:01:51Z","urls":"http://berkelium.org/","private":false,"tags":["proto-applications"]}},
>>> {"id":"291192e7b314d1e89412cd13b6dadb7e","key":[1313585931000,"pantagruel"],"value":{"_id":"291192e7b314d1e89412cd13b6dadb7e","_rev":"1-b18ff85d0a1cd6abeb5975424360f1a4","type":"bookmark","user":"pantagruel","desc":"Tablib:
>>> Pythonic Tabular Datasets \u0097 Tablib v0.9.11
>>> documentation","datetime":"2011-08-17T12:58:51Z","urls":"http://docs.tablib.org/en/latest/index.html","private":false,"tags":["data","python","programminglibrary"]}},
>>> {"id":"47c7cde7b8b70a5db0ad8bbcb962cac2","key":[1313579773000,"pantagruel"],"value":{"_id":"47c7cde7b8b70a5db0ad8bbcb962cac2","_rev":"3-b48b2888574255f114a66edf4806d6b1","type":"bookmark","user":"pantagruel","desc":"Plask","datetime":"2011-08-17T11:16:13Z","urls":"http://www.plask.org/","private":false,"tags":["graphics","mac","programming"]}},
>>> {"id":"79a5fd984a8ec8850ed4aa0860f330d0","key":[1313579305000,"pantagruel"],"value":{"_id":"79a5fd984a8ec8850ed4aa0860f330d0","_rev":"3-b3d076639c33c1112b60bb7dc0a7d5e2","type":"bookmark","user":"pantagruel","desc":"It
>>> does one thing and it does it well. |
>>> MetaFilter","datetime":"2011-08-17T11:08:25Z","urls":"http://www.metafilter.com/106567/It-does-one-thing-and-it-does-it-well","private":false,"tags":["tools","proto-applications"]}},
>>> {"id":"b05611b60b3404a5d6139f80609de620","key":[1313567910000,"pantagruel"],"value":{"_id":"b05611b60b3404a5d6139f80609de620","_rev":"3-660498c09352d5dbae70bf2abbcc7f1b","type":"bookmark","user":"pantagruel","desc":"spherical
>>> lightshades of various sorts made from everyday objects - playiing
>>> cards, train tickets
>>> etc.","datetime":"2011-08-17T07:58:30Z","urls":"http://www.flickr.com/photos/nicksayers/4319867051/","private":false,"tags":["lighting","origami"]}},
>>> {"id":"6702af5247e703b2be832098b2c7daf7","key":[1313494859000,"pantagruel"],"value":{"_id":"6702af5247e703b2be832098b2c7daf7","_rev":"1-c44b734cc3366045b0a940d61f56ce31","type":"bookmark","user":"pantagruel","desc":"Restarting
>>> Node.js When Your Source Changes - Christopher Bennage - Devlicio.us -
>>> Just the Tasty
>>> 
>>> Bits","datetime":"2011-08-16T11:40:59Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/08/09/restarting-node-js-when-your-source-changes.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node","tools:development"]}},
>>> {"id":"95e73cbb9288dc8d9323ecdb22f5e8a2","key":[1313494650000,"pantagruel"],"value":{"_id":"95e73cbb9288dc8d9323ecdb22f5e8a2","_rev":"1-4bea5cffa62d12298a741b7dd88a496d","type":"bookmark","user":"pantagruel","desc":"rewrite
>>> bits of url template, couchdb
>>> loading","datetime":"2011-08-16T11:37:30Z","urls":"http://msdn.microsoft.com/en-us/scriptjunkie/gg723713","private":false,"tags":["proto-community","javascript","code"]}},
>>> {"id":"f255a93d4b7f32d080a43d0d58d76e5c","key":[1313494545000,"pantagruel"],"value":{"_id":"f255a93d4b7f32d080a43d0d58d76e5c","_rev":"1-3a5ad41a9f28410af31459a9566ecd1d","type":"bookmark","user":"pantagruel","desc":"The
>>> Shapes of CSS","datetime":"2011-08-16T11:35:45Z","urls":"http://css-tricks.com/examples/ShapesOfCSS/","private":false,"tags":["css","code"]}},
>>> {"id":"2f89a3f8052eb93596c377fcf291826b","key":[1313494428000,"pantagruel"],"value":{"_id":"2f89a3f8052eb93596c377fcf291826b","_rev":"1-da045cffcd808b68fa51cbccc3486631","type":"bookmark","user":"pantagruel","desc":"pjscrape:
>>> A web-scraping framework written in Javascript, using PhantomJS and
>>> jQuery","datetime":"2011-08-16T11:33:48Z","urls":"http://nrabinowitz.github.com/pjscrape/?utm_source=twitterfeed&utm_medium=twitter","private":false,"tags":["javascript","proto-applications"]}},
>>> {"id":"6e4c4b61a018dc2ba77198c422bc6532","key":[1313492816000,"pantagruel"],"value":{"_id":"6e4c4b61a018dc2ba77198c422bc6532","_rev":"1-cee0375e7980d78577aa306ad088bac2","type":"bookmark","user":"pantagruel","desc":"List
>>> of Algorithms","datetime":"2011-08-16T11:06:56Z","urls":"http://www.scriptol.com/programming/list-algorithms.php","private":false,"tags":["algorithms"]}},
>>> {"id":"4645ba14e94f19db9fe88dcc0384248e","key":[1313492787000,"pantagruel"],"value":{"_id":"4645ba14e94f19db9fe88dcc0384248e","_rev":"1-b9146f0b9e80e74794c329198d11bb82","type":"bookmark","user":"pantagruel","desc":"Amazing
>>> algorithms to enhance or transform
>>> images","datetime":"2011-08-16T11:06:27Z","urls":"http://www.scriptol.com/programming/graphic-algorithms.php","private":false,"tags":["graphics","programming","proto-applications"]}},
>>> {"id":"4a1bfe802fc97b0eee1dbaeadd792524","key":[1313492746000,"pantagruel"],"value":{"_id":"4a1bfe802fc97b0eee1dbaeadd792524","_rev":"1-484607ac9cfea85f9c3745f51ce0767a","type":"bookmark","user":"pantagruel","desc":"D3
>>> for Mere Mortals","datetime":"2011-08-16T11:05:46Z","urls":"http://www.recursion.org/d3-for-mere-mortals/","private":false,"tags":["svg","graphs","graphsproject","graphics","javascript","code"]}},
>>> {"id":"97bd4002f3c131c0a27224ff5ab54962","key":[1313492433000,"pantagruel"],"value":{"_id":"97bd4002f3c131c0a27224ff5ab54962","_rev":"1-9358afd81d6106747425f41c210773b8","type":"bookmark","user":"pantagruel","desc":"Fixing
>>> the JavaScript typeof operator \u00ab JavaScript,
>>> JavaScript\u0085","datetime":"2011-08-16T11:00:33Z","urls":"http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/","private":false,"tags":["javascript","code"]}},
>>> {"id":"ae520bb3199bc5278472db70026227a6","key":[1313492392000,"pantagruel"],"value":{"_id":"ae520bb3199bc5278472db70026227a6","_rev":"1-0d1060f1263b48541f2dde201718eea2","type":"bookmark","user":"pantagruel","desc":"31
>>> days of Canvas tutorials |
>>> CreativeJS","datetime":"2011-08-16T10:59:52Z","urls":"http://creativejs.com/2011/08/31-days-of-canvas-tutorials/","private":false,"tags":["canvas","tutorials"]}},
>>> {"id":"3a12eb5cf3c99b86d297359addd5c2e6","key":[1313011517000,"pantagruel"],"value":{"_id":"3a12eb5cf3c99b86d297359addd5c2e6","_rev":"1-0ab9a437419fded98b1523edddc60b74","type":"bookmark","user":"pantagruel","desc":"Steven
>>> Frank: Programming for Mere
>>> Mortals","datetime":"2011-08-10T21:25:17Z","urls":"http://stevenf.com/pages/book.html","private":false,"tags":["books"]}},
>>> {"id":"39bb27a174c718515371fb285692e127","key":[1313011397000,"pantagruel"],"value":{"_id":"39bb27a174c718515371fb285692e127","_rev":"1-31b4db2c7b719957f39042e0c9ac90dc","type":"bookmark","user":"pantagruel","desc":"SNAP:
>>> Stanford Network Analysis
>>> Platform","datetime":"2011-08-10T21:23:17Z","urls":"http://snap.stanford.edu/snap/","private":false,"tags":["graphs","analysis","network"]}},
>>> {"id":"1f917619a292d30bc720fb782395be2d","key":[1312925609000,"pantagruel"],"value":{"_id":"1f917619a292d30bc720fb782395be2d","_rev":"1-1b6b9854c4aad8fd598a1f852a4a69f9","type":"bookmark","user":"pantagruel","desc":"Dead
>>> Reckonings \u00bb The Art of Nomography I: Geometric
>>> Design","datetime":"2011-08-09T21:33:29Z","urls":"http://myreckonings.com/wordpress/2008/01/09/the-art-of-nomography-i-geometric-design","private":false,"tags":["visualization","math","graphics","graphs"]}},
>>> {"id":"fad2013fa0a8f3fb25b32c7e5bd54c86","key":[1312925581000,"pantagruel"],"value":{"_id":"fad2013fa0a8f3fb25b32c7e5bd54c86","_rev":"1-2f6843f530ff9b3631a4bf40dfcf762e","type":"bookmark","user":"pantagruel","desc":"mnot\u0092s
>>> blog: On HTTP Load
>>> Testing","datetime":"2011-08-09T21:33:01Z","urls":"http://www.mnot.net/blog/2011/05/18/http_benchmark_rules","private":false,"tags":["performance","testing"]}},
>>> {"id":"987896224cc633b541fa44bd02cec9d2","key":[1312789590000,"pantagruel"],"value":{"_id":"987896224cc633b541fa44bd02cec9d2","_rev":"1-ee67a20bc8edd0c6132787b07fac2305","type":"bookmark","user":"pantagruel","desc":"pubsubhubbub
>>> - A simple, open, web-hook-based pubsub protocol & open source
>>> reference implementation. - Google Project
>>> Hosting","datetime":"2011-08-08T07:46:30Z","urls":"http://code.google.com/p/pubsubhubbub/","private":false,"tags":["proto-community"]}},
>>> {"id":"93b4fbc0a51385f810dbf3138a5a5963","key":[1312736772000,"pantagruel"],"value":{"_id":"93b4fbc0a51385f810dbf3138a5a5963","_rev":"1-9f11036ae95834ded058d1ddff6840e1","type":"bookmark","user":"pantagruel","desc":"MAKE
>>> | Stereo Panel Controls Bonkers Living Room Lighting
>>> Scheme","datetime":"2011-08-07T17:06:12Z","urls":"http://blog.makezine.com/archive/2011/08/stereo-panel-controls-bonkers-living-room-lighting-scheme.html","private":false,"tags":["diy","lighting","automation"]}},
>>> {"id":"1bfa04421ea8c0bd9635a7db9572cbfd","key":[1312736715000,"pantagruel"],"value":{"_id":"1bfa04421ea8c0bd9635a7db9572cbfd","_rev":"1-c90b97eaf514dbdb95d1649452c56173","type":"bookmark","user":"pantagruel","desc":"Neu!
>>> '75 | MetaFilter","datetime":"2011-08-07T17:05:15Z","urls":"http://www.metafilter.com/106287/Neu-75","private":false,"tags":["music"]}},
>>> {"id":"6ce5e1c31c2aeec7d105d4429fc59ef1","key":[1312723198000,"pantagruel"],"value":{"_id":"6ce5e1c31c2aeec7d105d4429fc59ef1","_rev":"1-0b9f2377595ba5705dea39764a4e6b79","type":"bookmark","user":"pantagruel","desc":"Cyberwar
>>> | MetaFilter","datetime":"2011-08-07T13:19:58Z","urls":"http://www.metafilter.com/106258/Cyberwar","private":false,"tags":["security","crime","writing"]}},
>>> {"id":"a3bbf1b1dc0b96a6ab50ae072d585005","key":[1312717703000,"pantagruel"],"value":{"_id":"a3bbf1b1dc0b96a6ab50ae072d585005","_rev":"1-632dd0bca2618849b9182b4f4096d532","type":"bookmark","user":"pantagruel","desc":"Main
>>> \u00a7 Digital Atlas of Roman and Medieval
>>> Civilization","datetime":"2011-08-07T11:48:23Z","urls":"http://medievalmap.harvard.edu/icb/icb.do?keyword=k40248&tabgroupid=icb.tabgroup53584","private":false,"tags":["resources","igprojects","phantaz","writing"]}},
>>> {"id":"ca6ba808fd97885bdce430dc72a0536e","key":[1312709056000,"pantagruel"],"value":{"_id":"ca6ba808fd97885bdce430dc72a0536e","_rev":"1-39bb45de310f43b903fbd999e93ac44b","type":"bookmark","user":"pantagruel","desc":"You
>>> Got The Love | MetaFilter","datetime":"2011-08-07T09:24:16Z","urls":"http://www.metafilter.com/106274/You-Got-The-Love","private":false,"tags":["music"]}},
>>> {"id":"8968ca7322577989f11b4c91d0f2e6f4","key":[1312707581000,"pantagruel"],"value":{"_id":"8968ca7322577989f11b4c91d0f2e6f4","_rev":"1-b386c153c42b84f37260657a13e17564","type":"bookmark","user":"pantagruel","desc":"JSTOR:
>>> fascist aesthetics","datetime":"2011-08-07T08:59:41Z","urls":"http://www.jstor.org/pss/261165","private":false,"tags":["design","igprojects"]}},
>>> {"id":"ae734941c67c0afe6bbead1f1e06258f","key":[1312669296000,"pantagruel"],"value":{"_id":"ae734941c67c0afe6bbead1f1e06258f","_rev":"1-81aa72e2d55c5a26f36829f119e792e6","type":"bookmark","user":"pantagruel","desc":"Introduction
>>> to Artificial Intelligence - Fall
>>> 2011","datetime":"2011-08-06T22:21:36Z","urls":"http://www.ai-class.com/","private":false,"tags":["education"]}},
>>> {"id":"f8da1a58b5df5aac4c177b5b35ee2da2","key":[1312669280000,"pantagruel"],"value":{"_id":"f8da1a58b5df5aac4c177b5b35ee2da2","_rev":"1-21fcd30e18deee5f67f91790ef903bec","type":"bookmark","user":"pantagruel","desc":"Math
>>> interview podcast |
>>> MetaFilter","datetime":"2011-08-06T22:21:20Z","urls":"http://www.metafilter.com/106252/Math-interview-podcast","private":false,"tags":["math"]}},
>>> {"id":"9cee84c163a1fa3a060b7b552bd6625c","key":[1312668878000,"pantagruel"],"value":{"_id":"9cee84c163a1fa3a060b7b552bd6625c","_rev":"1-f0990ab365c91218e9a4fc4582f7ac09","type":"bookmark","user":"pantagruel","desc":"Neil
>>> Fraser: Writing: Differential
>>> Synchronization","datetime":"2011-08-06T22:14:38Z","urls":"http://neil.fraser.name/writing/sync/","private":false,"tags":["algorithms"]}},
>>> {"id":"8dad181d5c9d30c29f3481e34e1bfc84","key":[1312661874000,"pantagruel"],"value":{"_id":"8dad181d5c9d30c29f3481e34e1bfc84","_rev":"1-3a800cba8606d2762e201e67e240bd6c","type":"bookmark","user":"pantagruel","desc":"NounProject","datetime":"2011-08-06T20:17:54Z","urls":"http://thenounproject.com/","private":false,"tags":["graphics","proto-community","design","resources"]}},
>>> {"id":"867081f73184f086b37574b5e7d85897","key":[1312661806000,"pantagruel"],"value":{"_id":"867081f73184f086b37574b5e7d85897","_rev":"1-e433eb5ea676974c680110f7c4f0d94b","type":"bookmark","user":"pantagruel","desc":"Node.js
>>> on Windows (or JavaScript for the backend) - Christopher Bennage -
>>> Devlicio.us - Just the Tasty
>>> Bits","datetime":"2011-08-06T20:16:46Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/07/28/node-js-on-windows.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node"]}},
>>> {"id":"8c379a8e14fac821aa47f08ef9eca802","key":[1312661717000,"pantagruel"],"value":{"_id":"8c379a8e14fac821aa47f08ef9eca802","_rev":"1-fc556ad7b802e0425054daf263f2e3ab","type":"bookmark","user":"pantagruel","desc":"templating","datetime":"2011-08-06T20:15:17Z","urls":"http://net.tutsplus.com/tutorials/javascript-ajax/into-the-ring-with-knockout-js/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29","private":false,"tags":["proto-community","code","javascript"]}},
>>> {"id":"5c5771b29846c2bfb708f78ab3435b51","key":[1312414365000,"pantagruel"],"value":{"_id":"5c5771b29846c2bfb708f78ab3435b51","_rev":"1-e7f9d8502ac83f4d43721331c2d25901","type":"bookmark","user":"pantagruel","desc":"Apps
>>> vs the Web \u00bb Matt Legend
>>> Gemmell","datetime":"2011-08-03T23:32:45Z","urls":"http://mattgemmell.com/2011/07/22/apps-vs-the-web","private":false,"tags":["programming","iphone","ipad"]}},
>>> {"id":"e618801b9dc1be7862fc7465999add66","key":[1312414295000,"pantagruel"],"value":{"_id":"e618801b9dc1be7862fc7465999add66","_rev":"1-d6752031884be850a488176fbe700a09","type":"bookmark","user":"pantagruel","desc":"blog.mobilephonesecurity.org:
>>> Voicemail hacking and the 'phone hacking' scandal - how it worked,
>>> questions to be asked and improvements to be
>>> made","datetime":"2011-08-03T23:31:35Z","urls":"http://blog.mobilephonesecurity.org/2011/07/voicemail-hacking-and-phone-hacking.html","private":false,"tags":["security"]}},
>>> {"id":"9420730ad098efc91c44ea59553e6af3","key":[1312413443000,"pantagruel"],"value":{"_id":"9420730ad098efc91c44ea59553e6af3","_rev":"1-c892a9af2e83d6d3b909aef27686ab0b","type":"bookmark","user":"pantagruel","desc":"PhoneGap","datetime":"2011-08-03T23:17:23Z","urls":"http://www.phonegap.com/","private":false,"tags":["iphone","programming","apis"]}}
>>> ]}
>>> 
>>> with the url
>>> 
>>> bookmarksByUserWithTimestamp?limit=50&descending=true&endKey=%22pantagruel%22
>>> 
>>> that's fine. it's what I want
>>> but when I do the following
>>> 
>>> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"
>>> 
>>> I get the same document.
>>> 
>>> When I do the following
>>> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"&startkey_docid=9420730ad098efc91c44ea59553e6af3
>>> I also get the same, the same if I skip the startKey parameter altogether
>>> 
>>> What I want obviously is to start returning documents from id
>>> 9420730ad098efc91c44ea59553e6af3
>>> how do I do that while still maintaining the descending=true order of
>>> my results?
>>> 
>>> Thanks,
>>> Bryan Rasmussen
>>> 
>> 


Re: complex keys, startkey_docid problems

Posted by bryan rasmussen <ra...@gmail.com>.
Ok thanks,
Bryan Rasmussen

On Fri, Sep 2, 2011 at 5:50 PM, Robert Newson <rn...@apache.org> wrote:
> A couple of things;
>
> 1) It's 'startkey' not 'startKey', ditto for 'endkey'.
> 2) array keys are not 'complex', they just sort later than strings and numbers.
> 3) you can only do contiguous ranges. e.g,
> ?startkey=["1314785463217"]&endkey=["1314785463217",{}] would find all
> keys where the first item is "1314785463217".
>
> More here: http://wiki.apache.org/couchdb/View_collation
>
> B.
>
> On 2 September 2011 15:40, bryan rasmussen <ra...@gmail.com> wrote:
>> Hi, I'm trying to make pagination as I see so many before me have tried.
>> I am returning rows like the following:
>>
>>
>> {"total_rows":16416,"offset":0,"rows":[
>> {"id":"e4ca6ead04c3bef1aebb090a6c0012bf","key":["1314785463217","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c0012bf","_rev":"1-38323bcdc91d2ca2a500877d64e853f0","tags":["mac","
>> proto-applications"," proto-community","
>> administration"],"urls":["http://code.google.com/p/munki/"],"name":"Munki
>> - managed software installs on mac","desc":"munki is a set of tools
>> that, used together with a webserver-based repository of packages and
>> package metadata, can be used by OS X administrators to manage
>> software installs (and in many cases removals) on OS X client
>> machines. ","user":"pantagruel","type":"bookmark","timestamp":"1314785463217","private":"true"}},
>> {"id":"e4ca6ead04c3bef1aebb090a6c000db9","key":["1314781849543","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000db9","_rev":"1-b34ebc8019a13af35743e9620846ed68","tags":["sleepproject"],"urls":["http://www.kk.org/cooltools/phone-band.png"],"name":"wakemate
>> sleep tracker","desc":"wakes you at optimal moment in sleep based on
>> actigraphy, iphone app
>> included","user":"pantagruel","type":"bookmark","timestamp":"1314781849543","private":"true"}},
>> {"id":"e4ca6ead04c3bef1aebb090a6c000736","key":["1314781724733","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000736","_rev":"1-3277bd60018d2e7a83bae34fcbc5c591","tags":["crafts","
>> furniture"," todo"],"urls":["http://blog.craftzine.com/archive/2011/08/how-to_custom_crafting_table.html"],"name":"How
>> To: Custom Crafting table","desc":"Guy made custom crafting table for
>> girlfriend","user":"pantagruel","type":"bookmark","timestamp":"1314781724733","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920008d83","key":["1314711957931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920008d83","_rev":"1-d1dd06602439909ca75cf86477304bfc","tags":["proto-community","
>> javascript"," security"],"urls":["http://cryptico.wwwtyro.net/"],"name":"simple
>> encryption with js","desc":"rsa
>> security","user":"pantagruel","type":"bookmark","timestamp":"1314711957931","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920005685","key":["1314688754986","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005685","_rev":"1-e20377028240f791a49699c9ef776d75","tags":["node","
>> windows"," iis"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/1fmcPzcG6bc/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx"],"name":"Scott
>> Hanselman","desc":"node.js on iis.
>> ","user":"pantagruel","type":"bookmark","timestamp":"1314688754986","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920005543","key":["1314688717931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005543","_rev":"1-b6eb3e86a0ced070b430899dfb91e1b3","tags":["javascript","
>> concurrent"," .net","
>> asynchronous"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/LAMDcMD5Yfw/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx"],"name":"Scott
>> Hanselman","desc":"Ive been spending some time exploring asynchrony
>> and scale recently.","user":"pantagruel","type":"bookmark","timestamp":"1314688717931","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd3492000553d","key":["1314623313554","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd3492000553d","_rev":"1-a71f9e8c3a843879457bcf4c3fa61005","tags":["igprojects","
>> computerscience"],"urls":["http://www.cs4fn.org/magic/"],"name":"The
>> Magic of Computer Science","desc":"Computer science with a view to
>> illusionism","user":"pantagruel","type":"bookmark","timestamp":"1314623313554","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920004d90","key":["1314622687423","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004d90","_rev":"1-2f352d7fb03e2507c5730819a0104de8","tags":["graphics","
>> programming"," python","
>> rasmus"],"urls":["http://www.disneyanimation.com/technology/opensource.html"],"name":"Walt
>> Disneys Open Source","desc":"Disney open source
>> code","user":"pantagruel","type":"bookmark","timestamp":"1314622687423","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920004a0a","key":["1314612540556","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004a0a","_rev":"1-e3abcc9faccc309b85ba19c6abe66488","tags":["python","
>> database"," validation"],"urls":["http://namlook.github.com/mongokit/"],"name":"MongoKit","desc":"MongoKit
>> is a python module that brings structured schema and validation layer
>> on top of the great pymongo driver. It has be written to be simpler
>> and lighter as possible with the KISS and DRY principles in
>> mind.","user":"pantagruel","type":"bookmark","timestamp":"1314612540556","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920003cd0","key":["1314612484796","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003cd0","_rev":"1-7d7bf3a2abf32e9603a15a4728e42e81","tags":["business"],"urls":["http://feedproxy.google.com/~r/boingboing/iBag/~3/hhmmaF8lEjI/stalwart-workers-neglected-backbone-of-the-firm.html"],"name":"Boing
>> Boing","desc":"Writing in a Harvard Business Review blog, professor
>> Thomas J. DeLong talks about Stalwart Workers, a neglected part of the
>> ...","user":"pantagruel","type":"bookmark","timestamp":"1314612484796","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920003070","key":["1314610839221","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003070","_rev":"1-baa7308bcd05a775b47a53bbec1ad355","tags":["statistics","
>> books"],"urls":["http://greenteapress.com/thinkstats/html/index.html"],"name":"Think
>> Stats","desc":"Probability and Statistics for
>> Programmers","user":"pantagruel","type":"bookmark","timestamp":"1314610839221","private":"true"}},
>> {"id":"78dfedabf05d09dec2efd34920001477","key":["1314603808566","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920001477","_rev":"1-18b915268f4d2b32e19db6001f447a56","tags":["graphics","
>> art"," igprojects"],"urls":["http://www.etsy.com/shop/alternatehistories"],"name":"prints
>> of ufos etc. in old paintings on etsy","desc":"prints of ufos etc. in
>> old paintings on
>> etsy","user":"pantagruel","type":"bookmark","timestamp":"1314603808566","private":"true"}},
>> {"id":"21d06bd703f5156277c16eb8310019e3","key":["1314210710636","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310019e3","_rev":"2-b6f02a113dc9137851371d8449ac2511","tags":["scalability","
>> mmx"],"urls":["http://highscalability.com/blog/2011/8/22/strategy-run-a-scalable-available-and-cheap-static-site-on-s.html"],"name":"Strategy:
>> Run a Scalable, Available, and Cheap Static Site on S3 or
>> GitHub","user":"pantagruel","type":"bookmark","timestamp":"1314210710636","private":"true","desc":"Werner
>> Vogels, chronicling his experience of transforming his All Things
>> Distributed blog into a static site using S3s ability to serve web
>> pages"}},
>> {"id":"21d06bd703f5156277c16eb831001919","key":["1314209004585","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb831001919","_rev":"2-d808ee1c6efdd122c411776a723fbdf3","tags":["proto-community","
>> mmx"],"urls":["http://jeffkreeftmeijer.com/2011/introducing-tapir-simple-search-for-static-sites/"],"name":"Introducing
>> Tapir","user":"pantagruel","type":"bookmark","timestamp":"1314209004585","private":"true","desc":"Tapir
>> is a simple application that indexes your RSS feed and uses Tire
>> (which is powered by Elasticsearch, which is powered by Lucene) to
>> index and search it. It gives you a straightforward JSON API that
>> returns the results."}},
>> {"id":"21d06bd703f5156277c16eb8310005ae","key":["1314102233143","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310005ae","_rev":"1-6b5142b91b05c0da179563db0c4e6527","tags":["audio","
>> google"],"urls":["http://googlesystem.blogspot.com/2011/08/music-rich-snippets-in-google-search.html"],"name":"Music
>> Rich Snippets in
>> Google","description":"","user":"pantagruel","type":"bookmark","timestamp":"1314102233143","private":"true"}},
>> {"id":"2ba97738fea2a8ae0f1b316c64923886","key":[1313615038000,"pantagruel"],"value":{"_id":"2ba97738fea2a8ae0f1b316c64923886","_rev":"5-78d666f665ac309a81f8d392f33f5492","type":"bookmark","user":"pantagruel","desc":"The
>> Web Is a Customer Service Medium
>> (Ftrain.com)","datetime":"2011-08-17T21:03:58Z","urls":"http://www.ftrain.com/wwic.html","private":false,"tags":["businessideas","thomson"],"_deleted_conflicts":["2-c70c0f9ef0b01573e4203e4314681f0a"]}},
>> {"id":"2f6b1522f93d96b9d1f482eacfa58895","key":[1313586111000,"pantagruel"],"value":{"_id":"2f6b1522f93d96b9d1f482eacfa58895","_rev":"3-bd80884dc94604efbfe50c7beac8f320","type":"bookmark","user":"pantagruel","desc":"Berkelium:","datetime":"2011-08-17T13:01:51Z","urls":"http://berkelium.org/","private":false,"tags":["proto-applications"]}},
>> {"id":"291192e7b314d1e89412cd13b6dadb7e","key":[1313585931000,"pantagruel"],"value":{"_id":"291192e7b314d1e89412cd13b6dadb7e","_rev":"1-b18ff85d0a1cd6abeb5975424360f1a4","type":"bookmark","user":"pantagruel","desc":"Tablib:
>> Pythonic Tabular Datasets \u0097 Tablib v0.9.11
>> documentation","datetime":"2011-08-17T12:58:51Z","urls":"http://docs.tablib.org/en/latest/index.html","private":false,"tags":["data","python","programminglibrary"]}},
>> {"id":"47c7cde7b8b70a5db0ad8bbcb962cac2","key":[1313579773000,"pantagruel"],"value":{"_id":"47c7cde7b8b70a5db0ad8bbcb962cac2","_rev":"3-b48b2888574255f114a66edf4806d6b1","type":"bookmark","user":"pantagruel","desc":"Plask","datetime":"2011-08-17T11:16:13Z","urls":"http://www.plask.org/","private":false,"tags":["graphics","mac","programming"]}},
>> {"id":"79a5fd984a8ec8850ed4aa0860f330d0","key":[1313579305000,"pantagruel"],"value":{"_id":"79a5fd984a8ec8850ed4aa0860f330d0","_rev":"3-b3d076639c33c1112b60bb7dc0a7d5e2","type":"bookmark","user":"pantagruel","desc":"It
>> does one thing and it does it well. |
>> MetaFilter","datetime":"2011-08-17T11:08:25Z","urls":"http://www.metafilter.com/106567/It-does-one-thing-and-it-does-it-well","private":false,"tags":["tools","proto-applications"]}},
>> {"id":"b05611b60b3404a5d6139f80609de620","key":[1313567910000,"pantagruel"],"value":{"_id":"b05611b60b3404a5d6139f80609de620","_rev":"3-660498c09352d5dbae70bf2abbcc7f1b","type":"bookmark","user":"pantagruel","desc":"spherical
>> lightshades of various sorts made from everyday objects - playiing
>> cards, train tickets
>> etc.","datetime":"2011-08-17T07:58:30Z","urls":"http://www.flickr.com/photos/nicksayers/4319867051/","private":false,"tags":["lighting","origami"]}},
>> {"id":"6702af5247e703b2be832098b2c7daf7","key":[1313494859000,"pantagruel"],"value":{"_id":"6702af5247e703b2be832098b2c7daf7","_rev":"1-c44b734cc3366045b0a940d61f56ce31","type":"bookmark","user":"pantagruel","desc":"Restarting
>> Node.js When Your Source Changes - Christopher Bennage - Devlicio.us -
>> Just the Tasty
>>
>> Bits","datetime":"2011-08-16T11:40:59Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/08/09/restarting-node-js-when-your-source-changes.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node","tools:development"]}},
>> {"id":"95e73cbb9288dc8d9323ecdb22f5e8a2","key":[1313494650000,"pantagruel"],"value":{"_id":"95e73cbb9288dc8d9323ecdb22f5e8a2","_rev":"1-4bea5cffa62d12298a741b7dd88a496d","type":"bookmark","user":"pantagruel","desc":"rewrite
>> bits of url template, couchdb
>> loading","datetime":"2011-08-16T11:37:30Z","urls":"http://msdn.microsoft.com/en-us/scriptjunkie/gg723713","private":false,"tags":["proto-community","javascript","code"]}},
>> {"id":"f255a93d4b7f32d080a43d0d58d76e5c","key":[1313494545000,"pantagruel"],"value":{"_id":"f255a93d4b7f32d080a43d0d58d76e5c","_rev":"1-3a5ad41a9f28410af31459a9566ecd1d","type":"bookmark","user":"pantagruel","desc":"The
>> Shapes of CSS","datetime":"2011-08-16T11:35:45Z","urls":"http://css-tricks.com/examples/ShapesOfCSS/","private":false,"tags":["css","code"]}},
>> {"id":"2f89a3f8052eb93596c377fcf291826b","key":[1313494428000,"pantagruel"],"value":{"_id":"2f89a3f8052eb93596c377fcf291826b","_rev":"1-da045cffcd808b68fa51cbccc3486631","type":"bookmark","user":"pantagruel","desc":"pjscrape:
>> A web-scraping framework written in Javascript, using PhantomJS and
>> jQuery","datetime":"2011-08-16T11:33:48Z","urls":"http://nrabinowitz.github.com/pjscrape/?utm_source=twitterfeed&utm_medium=twitter","private":false,"tags":["javascript","proto-applications"]}},
>> {"id":"6e4c4b61a018dc2ba77198c422bc6532","key":[1313492816000,"pantagruel"],"value":{"_id":"6e4c4b61a018dc2ba77198c422bc6532","_rev":"1-cee0375e7980d78577aa306ad088bac2","type":"bookmark","user":"pantagruel","desc":"List
>> of Algorithms","datetime":"2011-08-16T11:06:56Z","urls":"http://www.scriptol.com/programming/list-algorithms.php","private":false,"tags":["algorithms"]}},
>> {"id":"4645ba14e94f19db9fe88dcc0384248e","key":[1313492787000,"pantagruel"],"value":{"_id":"4645ba14e94f19db9fe88dcc0384248e","_rev":"1-b9146f0b9e80e74794c329198d11bb82","type":"bookmark","user":"pantagruel","desc":"Amazing
>> algorithms to enhance or transform
>> images","datetime":"2011-08-16T11:06:27Z","urls":"http://www.scriptol.com/programming/graphic-algorithms.php","private":false,"tags":["graphics","programming","proto-applications"]}},
>> {"id":"4a1bfe802fc97b0eee1dbaeadd792524","key":[1313492746000,"pantagruel"],"value":{"_id":"4a1bfe802fc97b0eee1dbaeadd792524","_rev":"1-484607ac9cfea85f9c3745f51ce0767a","type":"bookmark","user":"pantagruel","desc":"D3
>> for Mere Mortals","datetime":"2011-08-16T11:05:46Z","urls":"http://www.recursion.org/d3-for-mere-mortals/","private":false,"tags":["svg","graphs","graphsproject","graphics","javascript","code"]}},
>> {"id":"97bd4002f3c131c0a27224ff5ab54962","key":[1313492433000,"pantagruel"],"value":{"_id":"97bd4002f3c131c0a27224ff5ab54962","_rev":"1-9358afd81d6106747425f41c210773b8","type":"bookmark","user":"pantagruel","desc":"Fixing
>> the JavaScript typeof operator \u00ab JavaScript,
>> JavaScript\u0085","datetime":"2011-08-16T11:00:33Z","urls":"http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/","private":false,"tags":["javascript","code"]}},
>> {"id":"ae520bb3199bc5278472db70026227a6","key":[1313492392000,"pantagruel"],"value":{"_id":"ae520bb3199bc5278472db70026227a6","_rev":"1-0d1060f1263b48541f2dde201718eea2","type":"bookmark","user":"pantagruel","desc":"31
>> days of Canvas tutorials |
>> CreativeJS","datetime":"2011-08-16T10:59:52Z","urls":"http://creativejs.com/2011/08/31-days-of-canvas-tutorials/","private":false,"tags":["canvas","tutorials"]}},
>> {"id":"3a12eb5cf3c99b86d297359addd5c2e6","key":[1313011517000,"pantagruel"],"value":{"_id":"3a12eb5cf3c99b86d297359addd5c2e6","_rev":"1-0ab9a437419fded98b1523edddc60b74","type":"bookmark","user":"pantagruel","desc":"Steven
>> Frank: Programming for Mere
>> Mortals","datetime":"2011-08-10T21:25:17Z","urls":"http://stevenf.com/pages/book.html","private":false,"tags":["books"]}},
>> {"id":"39bb27a174c718515371fb285692e127","key":[1313011397000,"pantagruel"],"value":{"_id":"39bb27a174c718515371fb285692e127","_rev":"1-31b4db2c7b719957f39042e0c9ac90dc","type":"bookmark","user":"pantagruel","desc":"SNAP:
>> Stanford Network Analysis
>> Platform","datetime":"2011-08-10T21:23:17Z","urls":"http://snap.stanford.edu/snap/","private":false,"tags":["graphs","analysis","network"]}},
>> {"id":"1f917619a292d30bc720fb782395be2d","key":[1312925609000,"pantagruel"],"value":{"_id":"1f917619a292d30bc720fb782395be2d","_rev":"1-1b6b9854c4aad8fd598a1f852a4a69f9","type":"bookmark","user":"pantagruel","desc":"Dead
>> Reckonings \u00bb The Art of Nomography I: Geometric
>> Design","datetime":"2011-08-09T21:33:29Z","urls":"http://myreckonings.com/wordpress/2008/01/09/the-art-of-nomography-i-geometric-design","private":false,"tags":["visualization","math","graphics","graphs"]}},
>> {"id":"fad2013fa0a8f3fb25b32c7e5bd54c86","key":[1312925581000,"pantagruel"],"value":{"_id":"fad2013fa0a8f3fb25b32c7e5bd54c86","_rev":"1-2f6843f530ff9b3631a4bf40dfcf762e","type":"bookmark","user":"pantagruel","desc":"mnot\u0092s
>> blog: On HTTP Load
>> Testing","datetime":"2011-08-09T21:33:01Z","urls":"http://www.mnot.net/blog/2011/05/18/http_benchmark_rules","private":false,"tags":["performance","testing"]}},
>> {"id":"987896224cc633b541fa44bd02cec9d2","key":[1312789590000,"pantagruel"],"value":{"_id":"987896224cc633b541fa44bd02cec9d2","_rev":"1-ee67a20bc8edd0c6132787b07fac2305","type":"bookmark","user":"pantagruel","desc":"pubsubhubbub
>> - A simple, open, web-hook-based pubsub protocol & open source
>> reference implementation. - Google Project
>> Hosting","datetime":"2011-08-08T07:46:30Z","urls":"http://code.google.com/p/pubsubhubbub/","private":false,"tags":["proto-community"]}},
>> {"id":"93b4fbc0a51385f810dbf3138a5a5963","key":[1312736772000,"pantagruel"],"value":{"_id":"93b4fbc0a51385f810dbf3138a5a5963","_rev":"1-9f11036ae95834ded058d1ddff6840e1","type":"bookmark","user":"pantagruel","desc":"MAKE
>> | Stereo Panel Controls Bonkers Living Room Lighting
>> Scheme","datetime":"2011-08-07T17:06:12Z","urls":"http://blog.makezine.com/archive/2011/08/stereo-panel-controls-bonkers-living-room-lighting-scheme.html","private":false,"tags":["diy","lighting","automation"]}},
>> {"id":"1bfa04421ea8c0bd9635a7db9572cbfd","key":[1312736715000,"pantagruel"],"value":{"_id":"1bfa04421ea8c0bd9635a7db9572cbfd","_rev":"1-c90b97eaf514dbdb95d1649452c56173","type":"bookmark","user":"pantagruel","desc":"Neu!
>> '75 | MetaFilter","datetime":"2011-08-07T17:05:15Z","urls":"http://www.metafilter.com/106287/Neu-75","private":false,"tags":["music"]}},
>> {"id":"6ce5e1c31c2aeec7d105d4429fc59ef1","key":[1312723198000,"pantagruel"],"value":{"_id":"6ce5e1c31c2aeec7d105d4429fc59ef1","_rev":"1-0b9f2377595ba5705dea39764a4e6b79","type":"bookmark","user":"pantagruel","desc":"Cyberwar
>> | MetaFilter","datetime":"2011-08-07T13:19:58Z","urls":"http://www.metafilter.com/106258/Cyberwar","private":false,"tags":["security","crime","writing"]}},
>> {"id":"a3bbf1b1dc0b96a6ab50ae072d585005","key":[1312717703000,"pantagruel"],"value":{"_id":"a3bbf1b1dc0b96a6ab50ae072d585005","_rev":"1-632dd0bca2618849b9182b4f4096d532","type":"bookmark","user":"pantagruel","desc":"Main
>> \u00a7 Digital Atlas of Roman and Medieval
>> Civilization","datetime":"2011-08-07T11:48:23Z","urls":"http://medievalmap.harvard.edu/icb/icb.do?keyword=k40248&tabgroupid=icb.tabgroup53584","private":false,"tags":["resources","igprojects","phantaz","writing"]}},
>> {"id":"ca6ba808fd97885bdce430dc72a0536e","key":[1312709056000,"pantagruel"],"value":{"_id":"ca6ba808fd97885bdce430dc72a0536e","_rev":"1-39bb45de310f43b903fbd999e93ac44b","type":"bookmark","user":"pantagruel","desc":"You
>> Got The Love | MetaFilter","datetime":"2011-08-07T09:24:16Z","urls":"http://www.metafilter.com/106274/You-Got-The-Love","private":false,"tags":["music"]}},
>> {"id":"8968ca7322577989f11b4c91d0f2e6f4","key":[1312707581000,"pantagruel"],"value":{"_id":"8968ca7322577989f11b4c91d0f2e6f4","_rev":"1-b386c153c42b84f37260657a13e17564","type":"bookmark","user":"pantagruel","desc":"JSTOR:
>> fascist aesthetics","datetime":"2011-08-07T08:59:41Z","urls":"http://www.jstor.org/pss/261165","private":false,"tags":["design","igprojects"]}},
>> {"id":"ae734941c67c0afe6bbead1f1e06258f","key":[1312669296000,"pantagruel"],"value":{"_id":"ae734941c67c0afe6bbead1f1e06258f","_rev":"1-81aa72e2d55c5a26f36829f119e792e6","type":"bookmark","user":"pantagruel","desc":"Introduction
>> to Artificial Intelligence - Fall
>> 2011","datetime":"2011-08-06T22:21:36Z","urls":"http://www.ai-class.com/","private":false,"tags":["education"]}},
>> {"id":"f8da1a58b5df5aac4c177b5b35ee2da2","key":[1312669280000,"pantagruel"],"value":{"_id":"f8da1a58b5df5aac4c177b5b35ee2da2","_rev":"1-21fcd30e18deee5f67f91790ef903bec","type":"bookmark","user":"pantagruel","desc":"Math
>> interview podcast |
>> MetaFilter","datetime":"2011-08-06T22:21:20Z","urls":"http://www.metafilter.com/106252/Math-interview-podcast","private":false,"tags":["math"]}},
>> {"id":"9cee84c163a1fa3a060b7b552bd6625c","key":[1312668878000,"pantagruel"],"value":{"_id":"9cee84c163a1fa3a060b7b552bd6625c","_rev":"1-f0990ab365c91218e9a4fc4582f7ac09","type":"bookmark","user":"pantagruel","desc":"Neil
>> Fraser: Writing: Differential
>> Synchronization","datetime":"2011-08-06T22:14:38Z","urls":"http://neil.fraser.name/writing/sync/","private":false,"tags":["algorithms"]}},
>> {"id":"8dad181d5c9d30c29f3481e34e1bfc84","key":[1312661874000,"pantagruel"],"value":{"_id":"8dad181d5c9d30c29f3481e34e1bfc84","_rev":"1-3a800cba8606d2762e201e67e240bd6c","type":"bookmark","user":"pantagruel","desc":"NounProject","datetime":"2011-08-06T20:17:54Z","urls":"http://thenounproject.com/","private":false,"tags":["graphics","proto-community","design","resources"]}},
>> {"id":"867081f73184f086b37574b5e7d85897","key":[1312661806000,"pantagruel"],"value":{"_id":"867081f73184f086b37574b5e7d85897","_rev":"1-e433eb5ea676974c680110f7c4f0d94b","type":"bookmark","user":"pantagruel","desc":"Node.js
>> on Windows (or JavaScript for the backend) - Christopher Bennage -
>> Devlicio.us - Just the Tasty
>> Bits","datetime":"2011-08-06T20:16:46Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/07/28/node-js-on-windows.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node"]}},
>> {"id":"8c379a8e14fac821aa47f08ef9eca802","key":[1312661717000,"pantagruel"],"value":{"_id":"8c379a8e14fac821aa47f08ef9eca802","_rev":"1-fc556ad7b802e0425054daf263f2e3ab","type":"bookmark","user":"pantagruel","desc":"templating","datetime":"2011-08-06T20:15:17Z","urls":"http://net.tutsplus.com/tutorials/javascript-ajax/into-the-ring-with-knockout-js/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29","private":false,"tags":["proto-community","code","javascript"]}},
>> {"id":"5c5771b29846c2bfb708f78ab3435b51","key":[1312414365000,"pantagruel"],"value":{"_id":"5c5771b29846c2bfb708f78ab3435b51","_rev":"1-e7f9d8502ac83f4d43721331c2d25901","type":"bookmark","user":"pantagruel","desc":"Apps
>> vs the Web \u00bb Matt Legend
>> Gemmell","datetime":"2011-08-03T23:32:45Z","urls":"http://mattgemmell.com/2011/07/22/apps-vs-the-web","private":false,"tags":["programming","iphone","ipad"]}},
>> {"id":"e618801b9dc1be7862fc7465999add66","key":[1312414295000,"pantagruel"],"value":{"_id":"e618801b9dc1be7862fc7465999add66","_rev":"1-d6752031884be850a488176fbe700a09","type":"bookmark","user":"pantagruel","desc":"blog.mobilephonesecurity.org:
>> Voicemail hacking and the 'phone hacking' scandal - how it worked,
>> questions to be asked and improvements to be
>> made","datetime":"2011-08-03T23:31:35Z","urls":"http://blog.mobilephonesecurity.org/2011/07/voicemail-hacking-and-phone-hacking.html","private":false,"tags":["security"]}},
>> {"id":"9420730ad098efc91c44ea59553e6af3","key":[1312413443000,"pantagruel"],"value":{"_id":"9420730ad098efc91c44ea59553e6af3","_rev":"1-c892a9af2e83d6d3b909aef27686ab0b","type":"bookmark","user":"pantagruel","desc":"PhoneGap","datetime":"2011-08-03T23:17:23Z","urls":"http://www.phonegap.com/","private":false,"tags":["iphone","programming","apis"]}}
>> ]}
>>
>> with the url
>>
>> bookmarksByUserWithTimestamp?limit=50&descending=true&endKey=%22pantagruel%22
>>
>> that's fine. it's what I want
>> but when I do the following
>>
>> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"
>>
>> I get the same document.
>>
>> When I do the following
>> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"&startkey_docid=9420730ad098efc91c44ea59553e6af3
>> I also get the same, the same if I skip the startKey parameter altogether
>>
>> What I want obviously is to start returning documents from id
>> 9420730ad098efc91c44ea59553e6af3
>> how do I do that while still maintaining the descending=true order of
>> my results?
>>
>> Thanks,
>> Bryan Rasmussen
>>
>

Re: complex keys, startkey_docid problems

Posted by Robert Newson <rn...@apache.org>.
A couple of things;

1) It's 'startkey' not 'startKey', ditto for 'endkey'.
2) array keys are not 'complex', they just sort later than strings and numbers.
3) you can only do contiguous ranges. e.g,
?startkey=["1314785463217"]&endkey=["1314785463217",{}] would find all
keys where the first item is "1314785463217".

More here: http://wiki.apache.org/couchdb/View_collation

B.

On 2 September 2011 15:40, bryan rasmussen <ra...@gmail.com> wrote:
> Hi, I'm trying to make pagination as I see so many before me have tried.
> I am returning rows like the following:
>
>
> {"total_rows":16416,"offset":0,"rows":[
> {"id":"e4ca6ead04c3bef1aebb090a6c0012bf","key":["1314785463217","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c0012bf","_rev":"1-38323bcdc91d2ca2a500877d64e853f0","tags":["mac","
> proto-applications"," proto-community","
> administration"],"urls":["http://code.google.com/p/munki/"],"name":"Munki
> - managed software installs on mac","desc":"munki is a set of tools
> that, used together with a webserver-based repository of packages and
> package metadata, can be used by OS X administrators to manage
> software installs (and in many cases removals) on OS X client
> machines. ","user":"pantagruel","type":"bookmark","timestamp":"1314785463217","private":"true"}},
> {"id":"e4ca6ead04c3bef1aebb090a6c000db9","key":["1314781849543","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000db9","_rev":"1-b34ebc8019a13af35743e9620846ed68","tags":["sleepproject"],"urls":["http://www.kk.org/cooltools/phone-band.png"],"name":"wakemate
> sleep tracker","desc":"wakes you at optimal moment in sleep based on
> actigraphy, iphone app
> included","user":"pantagruel","type":"bookmark","timestamp":"1314781849543","private":"true"}},
> {"id":"e4ca6ead04c3bef1aebb090a6c000736","key":["1314781724733","pantagruel"],"value":{"_id":"e4ca6ead04c3bef1aebb090a6c000736","_rev":"1-3277bd60018d2e7a83bae34fcbc5c591","tags":["crafts","
> furniture"," todo"],"urls":["http://blog.craftzine.com/archive/2011/08/how-to_custom_crafting_table.html"],"name":"How
> To: Custom Crafting table","desc":"Guy made custom crafting table for
> girlfriend","user":"pantagruel","type":"bookmark","timestamp":"1314781724733","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920008d83","key":["1314711957931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920008d83","_rev":"1-d1dd06602439909ca75cf86477304bfc","tags":["proto-community","
> javascript"," security"],"urls":["http://cryptico.wwwtyro.net/"],"name":"simple
> encryption with js","desc":"rsa
> security","user":"pantagruel","type":"bookmark","timestamp":"1314711957931","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920005685","key":["1314688754986","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005685","_rev":"1-e20377028240f791a49699c9ef776d75","tags":["node","
> windows"," iis"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/1fmcPzcG6bc/InstallingAndRunningNodejsApplicationsWithinIISOnWindowsAreYouMad.aspx"],"name":"Scott
> Hanselman","desc":"node.js on iis.
> ","user":"pantagruel","type":"bookmark","timestamp":"1314688754986","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920005543","key":["1314688717931","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920005543","_rev":"1-b6eb3e86a0ced070b430899dfb91e1b3","tags":["javascript","
> concurrent"," .net","
> asynchronous"],"urls":["http://feedproxy.google.com/~r/ScottHanselman/~3/LAMDcMD5Yfw/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx"],"name":"Scott
> Hanselman","desc":"Ive been spending some time exploring asynchrony
> and scale recently.","user":"pantagruel","type":"bookmark","timestamp":"1314688717931","private":"true"}},
> {"id":"78dfedabf05d09dec2efd3492000553d","key":["1314623313554","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd3492000553d","_rev":"1-a71f9e8c3a843879457bcf4c3fa61005","tags":["igprojects","
> computerscience"],"urls":["http://www.cs4fn.org/magic/"],"name":"The
> Magic of Computer Science","desc":"Computer science with a view to
> illusionism","user":"pantagruel","type":"bookmark","timestamp":"1314623313554","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920004d90","key":["1314622687423","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004d90","_rev":"1-2f352d7fb03e2507c5730819a0104de8","tags":["graphics","
> programming"," python","
> rasmus"],"urls":["http://www.disneyanimation.com/technology/opensource.html"],"name":"Walt
> Disneys Open Source","desc":"Disney open source
> code","user":"pantagruel","type":"bookmark","timestamp":"1314622687423","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920004a0a","key":["1314612540556","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920004a0a","_rev":"1-e3abcc9faccc309b85ba19c6abe66488","tags":["python","
> database"," validation"],"urls":["http://namlook.github.com/mongokit/"],"name":"MongoKit","desc":"MongoKit
> is a python module that brings structured schema and validation layer
> on top of the great pymongo driver. It has be written to be simpler
> and lighter as possible with the KISS and DRY principles in
> mind.","user":"pantagruel","type":"bookmark","timestamp":"1314612540556","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920003cd0","key":["1314612484796","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003cd0","_rev":"1-7d7bf3a2abf32e9603a15a4728e42e81","tags":["business"],"urls":["http://feedproxy.google.com/~r/boingboing/iBag/~3/hhmmaF8lEjI/stalwart-workers-neglected-backbone-of-the-firm.html"],"name":"Boing
> Boing","desc":"Writing in a Harvard Business Review blog, professor
> Thomas J. DeLong talks about Stalwart Workers, a neglected part of the
> ...","user":"pantagruel","type":"bookmark","timestamp":"1314612484796","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920003070","key":["1314610839221","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920003070","_rev":"1-baa7308bcd05a775b47a53bbec1ad355","tags":["statistics","
> books"],"urls":["http://greenteapress.com/thinkstats/html/index.html"],"name":"Think
> Stats","desc":"Probability and Statistics for
> Programmers","user":"pantagruel","type":"bookmark","timestamp":"1314610839221","private":"true"}},
> {"id":"78dfedabf05d09dec2efd34920001477","key":["1314603808566","pantagruel"],"value":{"_id":"78dfedabf05d09dec2efd34920001477","_rev":"1-18b915268f4d2b32e19db6001f447a56","tags":["graphics","
> art"," igprojects"],"urls":["http://www.etsy.com/shop/alternatehistories"],"name":"prints
> of ufos etc. in old paintings on etsy","desc":"prints of ufos etc. in
> old paintings on
> etsy","user":"pantagruel","type":"bookmark","timestamp":"1314603808566","private":"true"}},
> {"id":"21d06bd703f5156277c16eb8310019e3","key":["1314210710636","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310019e3","_rev":"2-b6f02a113dc9137851371d8449ac2511","tags":["scalability","
> mmx"],"urls":["http://highscalability.com/blog/2011/8/22/strategy-run-a-scalable-available-and-cheap-static-site-on-s.html"],"name":"Strategy:
> Run a Scalable, Available, and Cheap Static Site on S3 or
> GitHub","user":"pantagruel","type":"bookmark","timestamp":"1314210710636","private":"true","desc":"Werner
> Vogels, chronicling his experience of transforming his All Things
> Distributed blog into a static site using S3s ability to serve web
> pages"}},
> {"id":"21d06bd703f5156277c16eb831001919","key":["1314209004585","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb831001919","_rev":"2-d808ee1c6efdd122c411776a723fbdf3","tags":["proto-community","
> mmx"],"urls":["http://jeffkreeftmeijer.com/2011/introducing-tapir-simple-search-for-static-sites/"],"name":"Introducing
> Tapir","user":"pantagruel","type":"bookmark","timestamp":"1314209004585","private":"true","desc":"Tapir
> is a simple application that indexes your RSS feed and uses Tire
> (which is powered by Elasticsearch, which is powered by Lucene) to
> index and search it. It gives you a straightforward JSON API that
> returns the results."}},
> {"id":"21d06bd703f5156277c16eb8310005ae","key":["1314102233143","pantagruel"],"value":{"_id":"21d06bd703f5156277c16eb8310005ae","_rev":"1-6b5142b91b05c0da179563db0c4e6527","tags":["audio","
> google"],"urls":["http://googlesystem.blogspot.com/2011/08/music-rich-snippets-in-google-search.html"],"name":"Music
> Rich Snippets in
> Google","description":"","user":"pantagruel","type":"bookmark","timestamp":"1314102233143","private":"true"}},
> {"id":"2ba97738fea2a8ae0f1b316c64923886","key":[1313615038000,"pantagruel"],"value":{"_id":"2ba97738fea2a8ae0f1b316c64923886","_rev":"5-78d666f665ac309a81f8d392f33f5492","type":"bookmark","user":"pantagruel","desc":"The
> Web Is a Customer Service Medium
> (Ftrain.com)","datetime":"2011-08-17T21:03:58Z","urls":"http://www.ftrain.com/wwic.html","private":false,"tags":["businessideas","thomson"],"_deleted_conflicts":["2-c70c0f9ef0b01573e4203e4314681f0a"]}},
> {"id":"2f6b1522f93d96b9d1f482eacfa58895","key":[1313586111000,"pantagruel"],"value":{"_id":"2f6b1522f93d96b9d1f482eacfa58895","_rev":"3-bd80884dc94604efbfe50c7beac8f320","type":"bookmark","user":"pantagruel","desc":"Berkelium:","datetime":"2011-08-17T13:01:51Z","urls":"http://berkelium.org/","private":false,"tags":["proto-applications"]}},
> {"id":"291192e7b314d1e89412cd13b6dadb7e","key":[1313585931000,"pantagruel"],"value":{"_id":"291192e7b314d1e89412cd13b6dadb7e","_rev":"1-b18ff85d0a1cd6abeb5975424360f1a4","type":"bookmark","user":"pantagruel","desc":"Tablib:
> Pythonic Tabular Datasets \u0097 Tablib v0.9.11
> documentation","datetime":"2011-08-17T12:58:51Z","urls":"http://docs.tablib.org/en/latest/index.html","private":false,"tags":["data","python","programminglibrary"]}},
> {"id":"47c7cde7b8b70a5db0ad8bbcb962cac2","key":[1313579773000,"pantagruel"],"value":{"_id":"47c7cde7b8b70a5db0ad8bbcb962cac2","_rev":"3-b48b2888574255f114a66edf4806d6b1","type":"bookmark","user":"pantagruel","desc":"Plask","datetime":"2011-08-17T11:16:13Z","urls":"http://www.plask.org/","private":false,"tags":["graphics","mac","programming"]}},
> {"id":"79a5fd984a8ec8850ed4aa0860f330d0","key":[1313579305000,"pantagruel"],"value":{"_id":"79a5fd984a8ec8850ed4aa0860f330d0","_rev":"3-b3d076639c33c1112b60bb7dc0a7d5e2","type":"bookmark","user":"pantagruel","desc":"It
> does one thing and it does it well. |
> MetaFilter","datetime":"2011-08-17T11:08:25Z","urls":"http://www.metafilter.com/106567/It-does-one-thing-and-it-does-it-well","private":false,"tags":["tools","proto-applications"]}},
> {"id":"b05611b60b3404a5d6139f80609de620","key":[1313567910000,"pantagruel"],"value":{"_id":"b05611b60b3404a5d6139f80609de620","_rev":"3-660498c09352d5dbae70bf2abbcc7f1b","type":"bookmark","user":"pantagruel","desc":"spherical
> lightshades of various sorts made from everyday objects - playiing
> cards, train tickets
> etc.","datetime":"2011-08-17T07:58:30Z","urls":"http://www.flickr.com/photos/nicksayers/4319867051/","private":false,"tags":["lighting","origami"]}},
> {"id":"6702af5247e703b2be832098b2c7daf7","key":[1313494859000,"pantagruel"],"value":{"_id":"6702af5247e703b2be832098b2c7daf7","_rev":"1-c44b734cc3366045b0a940d61f56ce31","type":"bookmark","user":"pantagruel","desc":"Restarting
> Node.js When Your Source Changes - Christopher Bennage - Devlicio.us -
> Just the Tasty
>
> Bits","datetime":"2011-08-16T11:40:59Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/08/09/restarting-node-js-when-your-source-changes.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node","tools:development"]}},
> {"id":"95e73cbb9288dc8d9323ecdb22f5e8a2","key":[1313494650000,"pantagruel"],"value":{"_id":"95e73cbb9288dc8d9323ecdb22f5e8a2","_rev":"1-4bea5cffa62d12298a741b7dd88a496d","type":"bookmark","user":"pantagruel","desc":"rewrite
> bits of url template, couchdb
> loading","datetime":"2011-08-16T11:37:30Z","urls":"http://msdn.microsoft.com/en-us/scriptjunkie/gg723713","private":false,"tags":["proto-community","javascript","code"]}},
> {"id":"f255a93d4b7f32d080a43d0d58d76e5c","key":[1313494545000,"pantagruel"],"value":{"_id":"f255a93d4b7f32d080a43d0d58d76e5c","_rev":"1-3a5ad41a9f28410af31459a9566ecd1d","type":"bookmark","user":"pantagruel","desc":"The
> Shapes of CSS","datetime":"2011-08-16T11:35:45Z","urls":"http://css-tricks.com/examples/ShapesOfCSS/","private":false,"tags":["css","code"]}},
> {"id":"2f89a3f8052eb93596c377fcf291826b","key":[1313494428000,"pantagruel"],"value":{"_id":"2f89a3f8052eb93596c377fcf291826b","_rev":"1-da045cffcd808b68fa51cbccc3486631","type":"bookmark","user":"pantagruel","desc":"pjscrape:
> A web-scraping framework written in Javascript, using PhantomJS and
> jQuery","datetime":"2011-08-16T11:33:48Z","urls":"http://nrabinowitz.github.com/pjscrape/?utm_source=twitterfeed&utm_medium=twitter","private":false,"tags":["javascript","proto-applications"]}},
> {"id":"6e4c4b61a018dc2ba77198c422bc6532","key":[1313492816000,"pantagruel"],"value":{"_id":"6e4c4b61a018dc2ba77198c422bc6532","_rev":"1-cee0375e7980d78577aa306ad088bac2","type":"bookmark","user":"pantagruel","desc":"List
> of Algorithms","datetime":"2011-08-16T11:06:56Z","urls":"http://www.scriptol.com/programming/list-algorithms.php","private":false,"tags":["algorithms"]}},
> {"id":"4645ba14e94f19db9fe88dcc0384248e","key":[1313492787000,"pantagruel"],"value":{"_id":"4645ba14e94f19db9fe88dcc0384248e","_rev":"1-b9146f0b9e80e74794c329198d11bb82","type":"bookmark","user":"pantagruel","desc":"Amazing
> algorithms to enhance or transform
> images","datetime":"2011-08-16T11:06:27Z","urls":"http://www.scriptol.com/programming/graphic-algorithms.php","private":false,"tags":["graphics","programming","proto-applications"]}},
> {"id":"4a1bfe802fc97b0eee1dbaeadd792524","key":[1313492746000,"pantagruel"],"value":{"_id":"4a1bfe802fc97b0eee1dbaeadd792524","_rev":"1-484607ac9cfea85f9c3745f51ce0767a","type":"bookmark","user":"pantagruel","desc":"D3
> for Mere Mortals","datetime":"2011-08-16T11:05:46Z","urls":"http://www.recursion.org/d3-for-mere-mortals/","private":false,"tags":["svg","graphs","graphsproject","graphics","javascript","code"]}},
> {"id":"97bd4002f3c131c0a27224ff5ab54962","key":[1313492433000,"pantagruel"],"value":{"_id":"97bd4002f3c131c0a27224ff5ab54962","_rev":"1-9358afd81d6106747425f41c210773b8","type":"bookmark","user":"pantagruel","desc":"Fixing
> the JavaScript typeof operator \u00ab JavaScript,
> JavaScript\u0085","datetime":"2011-08-16T11:00:33Z","urls":"http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/","private":false,"tags":["javascript","code"]}},
> {"id":"ae520bb3199bc5278472db70026227a6","key":[1313492392000,"pantagruel"],"value":{"_id":"ae520bb3199bc5278472db70026227a6","_rev":"1-0d1060f1263b48541f2dde201718eea2","type":"bookmark","user":"pantagruel","desc":"31
> days of Canvas tutorials |
> CreativeJS","datetime":"2011-08-16T10:59:52Z","urls":"http://creativejs.com/2011/08/31-days-of-canvas-tutorials/","private":false,"tags":["canvas","tutorials"]}},
> {"id":"3a12eb5cf3c99b86d297359addd5c2e6","key":[1313011517000,"pantagruel"],"value":{"_id":"3a12eb5cf3c99b86d297359addd5c2e6","_rev":"1-0ab9a437419fded98b1523edddc60b74","type":"bookmark","user":"pantagruel","desc":"Steven
> Frank: Programming for Mere
> Mortals","datetime":"2011-08-10T21:25:17Z","urls":"http://stevenf.com/pages/book.html","private":false,"tags":["books"]}},
> {"id":"39bb27a174c718515371fb285692e127","key":[1313011397000,"pantagruel"],"value":{"_id":"39bb27a174c718515371fb285692e127","_rev":"1-31b4db2c7b719957f39042e0c9ac90dc","type":"bookmark","user":"pantagruel","desc":"SNAP:
> Stanford Network Analysis
> Platform","datetime":"2011-08-10T21:23:17Z","urls":"http://snap.stanford.edu/snap/","private":false,"tags":["graphs","analysis","network"]}},
> {"id":"1f917619a292d30bc720fb782395be2d","key":[1312925609000,"pantagruel"],"value":{"_id":"1f917619a292d30bc720fb782395be2d","_rev":"1-1b6b9854c4aad8fd598a1f852a4a69f9","type":"bookmark","user":"pantagruel","desc":"Dead
> Reckonings \u00bb The Art of Nomography I: Geometric
> Design","datetime":"2011-08-09T21:33:29Z","urls":"http://myreckonings.com/wordpress/2008/01/09/the-art-of-nomography-i-geometric-design","private":false,"tags":["visualization","math","graphics","graphs"]}},
> {"id":"fad2013fa0a8f3fb25b32c7e5bd54c86","key":[1312925581000,"pantagruel"],"value":{"_id":"fad2013fa0a8f3fb25b32c7e5bd54c86","_rev":"1-2f6843f530ff9b3631a4bf40dfcf762e","type":"bookmark","user":"pantagruel","desc":"mnot\u0092s
> blog: On HTTP Load
> Testing","datetime":"2011-08-09T21:33:01Z","urls":"http://www.mnot.net/blog/2011/05/18/http_benchmark_rules","private":false,"tags":["performance","testing"]}},
> {"id":"987896224cc633b541fa44bd02cec9d2","key":[1312789590000,"pantagruel"],"value":{"_id":"987896224cc633b541fa44bd02cec9d2","_rev":"1-ee67a20bc8edd0c6132787b07fac2305","type":"bookmark","user":"pantagruel","desc":"pubsubhubbub
> - A simple, open, web-hook-based pubsub protocol & open source
> reference implementation. - Google Project
> Hosting","datetime":"2011-08-08T07:46:30Z","urls":"http://code.google.com/p/pubsubhubbub/","private":false,"tags":["proto-community"]}},
> {"id":"93b4fbc0a51385f810dbf3138a5a5963","key":[1312736772000,"pantagruel"],"value":{"_id":"93b4fbc0a51385f810dbf3138a5a5963","_rev":"1-9f11036ae95834ded058d1ddff6840e1","type":"bookmark","user":"pantagruel","desc":"MAKE
> | Stereo Panel Controls Bonkers Living Room Lighting
> Scheme","datetime":"2011-08-07T17:06:12Z","urls":"http://blog.makezine.com/archive/2011/08/stereo-panel-controls-bonkers-living-room-lighting-scheme.html","private":false,"tags":["diy","lighting","automation"]}},
> {"id":"1bfa04421ea8c0bd9635a7db9572cbfd","key":[1312736715000,"pantagruel"],"value":{"_id":"1bfa04421ea8c0bd9635a7db9572cbfd","_rev":"1-c90b97eaf514dbdb95d1649452c56173","type":"bookmark","user":"pantagruel","desc":"Neu!
> '75 | MetaFilter","datetime":"2011-08-07T17:05:15Z","urls":"http://www.metafilter.com/106287/Neu-75","private":false,"tags":["music"]}},
> {"id":"6ce5e1c31c2aeec7d105d4429fc59ef1","key":[1312723198000,"pantagruel"],"value":{"_id":"6ce5e1c31c2aeec7d105d4429fc59ef1","_rev":"1-0b9f2377595ba5705dea39764a4e6b79","type":"bookmark","user":"pantagruel","desc":"Cyberwar
> | MetaFilter","datetime":"2011-08-07T13:19:58Z","urls":"http://www.metafilter.com/106258/Cyberwar","private":false,"tags":["security","crime","writing"]}},
> {"id":"a3bbf1b1dc0b96a6ab50ae072d585005","key":[1312717703000,"pantagruel"],"value":{"_id":"a3bbf1b1dc0b96a6ab50ae072d585005","_rev":"1-632dd0bca2618849b9182b4f4096d532","type":"bookmark","user":"pantagruel","desc":"Main
> \u00a7 Digital Atlas of Roman and Medieval
> Civilization","datetime":"2011-08-07T11:48:23Z","urls":"http://medievalmap.harvard.edu/icb/icb.do?keyword=k40248&tabgroupid=icb.tabgroup53584","private":false,"tags":["resources","igprojects","phantaz","writing"]}},
> {"id":"ca6ba808fd97885bdce430dc72a0536e","key":[1312709056000,"pantagruel"],"value":{"_id":"ca6ba808fd97885bdce430dc72a0536e","_rev":"1-39bb45de310f43b903fbd999e93ac44b","type":"bookmark","user":"pantagruel","desc":"You
> Got The Love | MetaFilter","datetime":"2011-08-07T09:24:16Z","urls":"http://www.metafilter.com/106274/You-Got-The-Love","private":false,"tags":["music"]}},
> {"id":"8968ca7322577989f11b4c91d0f2e6f4","key":[1312707581000,"pantagruel"],"value":{"_id":"8968ca7322577989f11b4c91d0f2e6f4","_rev":"1-b386c153c42b84f37260657a13e17564","type":"bookmark","user":"pantagruel","desc":"JSTOR:
> fascist aesthetics","datetime":"2011-08-07T08:59:41Z","urls":"http://www.jstor.org/pss/261165","private":false,"tags":["design","igprojects"]}},
> {"id":"ae734941c67c0afe6bbead1f1e06258f","key":[1312669296000,"pantagruel"],"value":{"_id":"ae734941c67c0afe6bbead1f1e06258f","_rev":"1-81aa72e2d55c5a26f36829f119e792e6","type":"bookmark","user":"pantagruel","desc":"Introduction
> to Artificial Intelligence - Fall
> 2011","datetime":"2011-08-06T22:21:36Z","urls":"http://www.ai-class.com/","private":false,"tags":["education"]}},
> {"id":"f8da1a58b5df5aac4c177b5b35ee2da2","key":[1312669280000,"pantagruel"],"value":{"_id":"f8da1a58b5df5aac4c177b5b35ee2da2","_rev":"1-21fcd30e18deee5f67f91790ef903bec","type":"bookmark","user":"pantagruel","desc":"Math
> interview podcast |
> MetaFilter","datetime":"2011-08-06T22:21:20Z","urls":"http://www.metafilter.com/106252/Math-interview-podcast","private":false,"tags":["math"]}},
> {"id":"9cee84c163a1fa3a060b7b552bd6625c","key":[1312668878000,"pantagruel"],"value":{"_id":"9cee84c163a1fa3a060b7b552bd6625c","_rev":"1-f0990ab365c91218e9a4fc4582f7ac09","type":"bookmark","user":"pantagruel","desc":"Neil
> Fraser: Writing: Differential
> Synchronization","datetime":"2011-08-06T22:14:38Z","urls":"http://neil.fraser.name/writing/sync/","private":false,"tags":["algorithms"]}},
> {"id":"8dad181d5c9d30c29f3481e34e1bfc84","key":[1312661874000,"pantagruel"],"value":{"_id":"8dad181d5c9d30c29f3481e34e1bfc84","_rev":"1-3a800cba8606d2762e201e67e240bd6c","type":"bookmark","user":"pantagruel","desc":"NounProject","datetime":"2011-08-06T20:17:54Z","urls":"http://thenounproject.com/","private":false,"tags":["graphics","proto-community","design","resources"]}},
> {"id":"867081f73184f086b37574b5e7d85897","key":[1312661806000,"pantagruel"],"value":{"_id":"867081f73184f086b37574b5e7d85897","_rev":"1-e433eb5ea676974c680110f7c4f0d94b","type":"bookmark","user":"pantagruel","desc":"Node.js
> on Windows (or JavaScript for the backend) - Christopher Bennage -
> Devlicio.us - Just the Tasty
> Bits","datetime":"2011-08-06T20:16:46Z","urls":"http://devlicio.us/blogs/christopher_bennage/archive/2011/07/28/node-js-on-windows.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Devlicious+%28Devlicio.us%29","private":false,"tags":["node"]}},
> {"id":"8c379a8e14fac821aa47f08ef9eca802","key":[1312661717000,"pantagruel"],"value":{"_id":"8c379a8e14fac821aa47f08ef9eca802","_rev":"1-fc556ad7b802e0425054daf263f2e3ab","type":"bookmark","user":"pantagruel","desc":"templating","datetime":"2011-08-06T20:15:17Z","urls":"http://net.tutsplus.com/tutorials/javascript-ajax/into-the-ring-with-knockout-js/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+nettuts+%28Nettuts%2B%29","private":false,"tags":["proto-community","code","javascript"]}},
> {"id":"5c5771b29846c2bfb708f78ab3435b51","key":[1312414365000,"pantagruel"],"value":{"_id":"5c5771b29846c2bfb708f78ab3435b51","_rev":"1-e7f9d8502ac83f4d43721331c2d25901","type":"bookmark","user":"pantagruel","desc":"Apps
> vs the Web \u00bb Matt Legend
> Gemmell","datetime":"2011-08-03T23:32:45Z","urls":"http://mattgemmell.com/2011/07/22/apps-vs-the-web","private":false,"tags":["programming","iphone","ipad"]}},
> {"id":"e618801b9dc1be7862fc7465999add66","key":[1312414295000,"pantagruel"],"value":{"_id":"e618801b9dc1be7862fc7465999add66","_rev":"1-d6752031884be850a488176fbe700a09","type":"bookmark","user":"pantagruel","desc":"blog.mobilephonesecurity.org:
> Voicemail hacking and the 'phone hacking' scandal - how it worked,
> questions to be asked and improvements to be
> made","datetime":"2011-08-03T23:31:35Z","urls":"http://blog.mobilephonesecurity.org/2011/07/voicemail-hacking-and-phone-hacking.html","private":false,"tags":["security"]}},
> {"id":"9420730ad098efc91c44ea59553e6af3","key":[1312413443000,"pantagruel"],"value":{"_id":"9420730ad098efc91c44ea59553e6af3","_rev":"1-c892a9af2e83d6d3b909aef27686ab0b","type":"bookmark","user":"pantagruel","desc":"PhoneGap","datetime":"2011-08-03T23:17:23Z","urls":"http://www.phonegap.com/","private":false,"tags":["iphone","programming","apis"]}}
> ]}
>
> with the url
>
> bookmarksByUserWithTimestamp?limit=50&descending=true&endKey=%22pantagruel%22
>
> that's fine. it's what I want
> but when I do the following
>
> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"
>
> I get the same document.
>
> When I do the following
> bookmarksByUserWithTimestamp?limit=50&descending=true&startKey=1312413443000&endKey="pantagruel"&startkey_docid=9420730ad098efc91c44ea59553e6af3
> I also get the same, the same if I skip the startKey parameter altogether
>
> What I want obviously is to start returning documents from id
> 9420730ad098efc91c44ea59553e6af3
> how do I do that while still maintaining the descending=true order of
> my results?
>
> Thanks,
> Bryan Rasmussen
>