couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bykov <m.by...@gmail.com>
Subject Re: case-sensitive search
Date Fri, 12 Aug 2011 08:17:36 GMT
12 августа 2011 г. 11:40 пользователь Robert Newson
<rnewson@apache.org> написал:
> 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.
>



Thank you all.

case-sensitive search does not work that simple as
".dict.toLowerCase()", because of collation rules, alas.

But I could get what I want with

      "by_word" : {
            "map" : "function(doc) { if (doc.type == 'latin-dict') {
emit(doc.dict, doc);  }}",
            "options": {"collation":"raw"}}


Thank you once more. great!

-- 
М.

http://diglossa.org
xmpp://m.bykov@jabber.ru

Mime
View raw message