Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49B98EB96 for ; Thu, 21 Feb 2013 11:14:32 +0000 (UTC) Received: (qmail 50826 invoked by uid 500); 21 Feb 2013 11:14:30 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 50769 invoked by uid 500); 21 Feb 2013 11:14:30 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 50753 invoked by uid 99); 21 Feb 2013 11:14:30 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 11:14:30 +0000 Received: from localhost (HELO mail-la0-f42.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 11:14:30 +0000 Received: by mail-la0-f42.google.com with SMTP id fe20so8683647lab.29 for ; Thu, 21 Feb 2013 03:14:28 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.125.239 with SMTP id mt15mr20881522lab.26.1361445268062; Thu, 21 Feb 2013 03:14:28 -0800 (PST) Received: by 10.112.25.201 with HTTP; Thu, 21 Feb 2013 03:14:27 -0800 (PST) In-Reply-To: References: <20130221200843.3bb8db3f@dede> Date: Thu, 21 Feb 2013 11:14:27 +0000 Message-ID: Subject: Re: email as _id? From: Robert Newson To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 correct, you can't start a doc id with _. It seems simple enough to solve this by prefixing "email:" to your ids. B. On 21 February 2013 11:12, Vincenzo Scolaro wrote: > I had the same need and I did it this way > id = md5 (email) > > What do you think? > > Vincenzo > > > 2013/2/21 svilen > >> hi >> the docs state that anything can be put in _id, except that it can't >> start with "_" underscore. >> >> still, the _ is valid character for starting email address... >> effectively meaning that in general, e-mail addresses cannot be used as >> id (the only enforced unique thing).. and has to be stored as a field. >> or prepended with something non-underscore. >> >> correct? >> >> svil >>