On Fri, Aug 12, 2011 at 12:25 AM, Michael Bykov <[email protected]> wrote:
> Hi,
>
> I am searching couchdb by attibute values with POST request {"keys":
> ["key1", "key2", ...]}
>
> Here is request
>
>        RestClient.post "#{DB}/_design/paradigm/_view/by_word",
> {"keys"=>["#{word}"]}.to_json, :content_type => :json, :accept =>
> :json
>
> and here is view function:
>
>       "by_word" : {
>            "map" : "function(doc) { if (doc.dict) { emit(doc.dict, doc);  }}"
>        }
>
> It works perfect, but search is case-insensitive in that form.
>
> How case-sensitive search can be done?
>
>
> --
> М.
>
> http://diglossa.org
> xmpp://[email protected]
>

By default CouchDB uses UCA case insensitive collation. Currently the
only way to get case sensitive collation is to use the raw collation
type, but be aware that this changes the sort ordering for all
objects. You can find a bit more description at [1].


[1] http://wiki.apache.org/couchdb/View_collation#Raw_collation

Reply via email to