couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Talbot <ja...@jamietalbot.com>
Subject Re: Size of couchdb documents
Date Thu, 15 Mar 2012 17:38:29 GMT
So, just to understand, it's best to generate IDs in an encoding that
matches the collation order of CouchDB exactly?

I was using this:

'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-@'

though, as I now understand it, the following is better:

'-@0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ'

Is that correct?

I decided to go for Base 64 encoding, as you can do fast bitwise
encodes and decodes.  You can see a sample encoding/decoding class
that does this in PHP here:

https://github.com/majelbstoat/Celsus/blob/master/library/Celsus/Encoder.php

Cheers,

Jamie.

On Thu, Mar 15, 2012 at 09:31, Matthieu Rakotojaona
<matthieu.rakotojaona@gmail.com> wrote:
> On Thu, Mar 15, 2012 at 4:14 PM, Daniel Gonzalez <gonvaled@gonvaled.com> wrote:
>> I have one more question. Is the alphabet I have shown above "ordered" for
>> couchdb?
>
> From the wiki (http://wiki.apache.org/couchdb/View_collation#Collation_Specification),
> your alphabet is not optimal. The link will explain better than me
> what would be the best choice for your alphabet =]
>
> --
> Matthieu RAKOTOJAONA



-- 
---
http://jamietalbot.com

Mime
View raw message