Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0816D11E65 for ; Fri, 27 Jun 2014 20:28:38 +0000 (UTC) Received: (qmail 82829 invoked by uid 500); 27 Jun 2014 20:28:37 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 82771 invoked by uid 500); 27 Jun 2014 20:28:37 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 82760 invoked by uid 99); 27 Jun 2014 20:28:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 20:28:37 +0000 X-ASF-Spam-Status: No, hits=-4.3 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [32.97.182.137] (HELO e7.ny.us.ibm.com) (32.97.182.137) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 20:28:30 +0000 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jun 2014 16:28:09 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Jun 2014 16:28:07 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id CC70D6E8041 for ; Fri, 27 Jun 2014 16:27:57 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp23034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5RKRw8H1114410 for ; Fri, 27 Jun 2014 20:28:06 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5RKRYOQ008366 for ; Fri, 27 Jun 2014 16:27:34 -0400 Received: from [9.80.93.177] ([9.80.93.177]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5RKRXZI008113 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 27 Jun 2014 16:27:34 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: Cloudant Query From: Adam Kocoloski In-Reply-To: <2f161f5ec5bf47a0bf5f0b87f7c12945@BLUPR06MB209.namprd06.prod.outlook.com> Date: Fri, 27 Jun 2014 16:27:16 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <3F599731-F3A7-4477-9000-67E17B9B7A38@apache.org> References: <2f161f5ec5bf47a0bf5f0b87f7c12945@BLUPR06MB209.namprd06.prod.outlook.com> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1878.2) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14062720-5806-0000-0000-000025404C00 X-Virus-Checked: Checked by ClamAV on apache.org On Jun 27, 2014, at 2:12 PM, Benjamin Young = wrote: >> -----Original Message----- >> From: Alexander Shorin [mailto:kxepal@gmail.com] >> Sent: Thursday, June 26, 2014 11:42 AM >> To: dev@couchdb.apache.org >> Subject: Re: Cloudant Query >>=20 >> Can we first receive a bit more better description what is Cloudant = Query and >> new Index thing first? >> I see for now it as some sort of abstraction over view/geo/fts = indexes with >> hand-made custom query protocol and as confusion since it creates = second >> entrance point for manage the ddocs. >=20 > Agreed. It's unclear what the shape of these new documents are, = whether they replicate, etc. Perhaps it's too soon to say? >=20 > It also introduces two new endpoints `_index` and `_find` just below = the database name which is also troublesome for long term API health. >=20 > I do like the idea, though! :) Hi Ben, Alexander, Thanks for the feedback! The _index endpoint is mostly syntactic sugar = and validation on top of _design documents. You could create these ddocs = yourself by setting "language":"query" and configuring the other fields = appropriately and the _find implementation would know to use them. As = design documents they certainly do replicate. I can see where an expert = CouchDB user might balk at having another API endpoint for ddoc = manipulation, but we wanted to make sure that Query was approachable for = folks who don't have a ton of background with CouchDB. The _find endpoint does more heavy lifting. Roughly speaking it a) determines the most appropriate index to use for the query, b) applies any additional selector criteria on the index entries to = produce the final doc set, and c) filters the docs to only return the requested fields. The current version of Query does _not_ incorporate data from FTS or Geo = indexes, although I'm sure you can imagine that we're interested in = doing that :) As far as the "hand-made custom query protocol" is concerned, there's a = reason we announced it at MongoDB World. The structure of the "selector" = field in the body that you POST to /db/_find is modeled directly on the = BSON that you would supply to MongoDB in db.coll.find(). Cheers, Adam=