Is it true that, emitting 1 takes less space than emitting null? Marcello
2011/8/12 Robert Newson <[email protected]>: > Erm, emit(doc.dict.toLowerCase(), doc); ? > > Also you don't need to emit the whole doc. Emit null and use > ?include_docs=true, it'll use less disk space (but be slightly slower > for the extra lookup). > > B. > > On 12 August 2011 06:31, Paul Davis <[email protected]> wrote: >> 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 >> >
