On Wed, Sep 24, 2008 at 1:43 AM, Ayende Rahien <[EMAIL PROTECTED]> wrote: > > Okay, here are my current finding. > Views are trees keyed by a different key than the DB. Not sure yet how this > works with regards to sorting on non string data (dates,floats). >
All the data in the files is serialized using term_to_binary (an Erlang built in function). The keys can be non-string, because the sorting (collation) order is defined for all of the valid JSON types (and nested structures). See couch_view:less_json/2 for the sorting code. I think the reuse of btree's for both databases and views is especially elegant, as it means that any optimizations on pulling rows by key, also speed up replication and normal operations. Chris -- Chris Anderson http://jchris.mfdz.com
