incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: CouchDB: Case Insensitive Keys
Date Tue, 22 Oct 2013 01:20:07 GMT

On Oct 21, 2013, at 12:19 PM, Hank Knight <hknight555@gmail.com> wrote:

> Can I do a search based on a case-insensitive key?
> 
> For example "aBc" should return the same results as "AbB".

It looks from the description of the collation algorithm* that it’s already mostly case-insensitive.
(The comment says “case-sensitive” but I think what it means is that a lowercase string
sorts before its uppercase equivalent.) Note that both “A” and “a” sort before “b”
or “B”.

So regardless of the case of the keys that got emitted, if you query with a key range of “abc”
through “ABC” you should get all keys that are case-insensitively equal to “abc”.

—Jens

* http://wiki.apache.org/couchdb/View_collation#Collation_Specification
Mime
View raw message