Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 43114 invoked from network); 8 Oct 2010 17:21:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Oct 2010 17:21:52 -0000 Received: (qmail 43215 invoked by uid 500); 8 Oct 2010 17:21:50 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 43136 invoked by uid 500); 8 Oct 2010 17:21:50 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 43128 invoked by uid 99); 8 Oct 2010 17:21:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 17:21:50 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 17:21:43 +0000 Received: by wyi11 with SMTP id 11so1529908wyi.31 for ; Fri, 08 Oct 2010 10:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=FWPtfA9gedfvB+Qqof5+PVAfarsPk09vB/KPpjaU9Cs=; b=BeBvisHks3hAGWGTLnIVkSon/RdYEypMLPJW119IRaRQQmCGfFN49u7XQYUKtQLSBZ OBJkloJz6kPrVOMxyawBD5SIsJJ1Ttz0XzsEZLtfcsW2uj29FadQU6mfIHE+JWQPJNDt +N5RrPqfOXHPh6Yvi1hoN+J6WgewxFgA+1Vl0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=fmjPaHgqWDRbtqafTFwVXcHeWG/afkQaDd9Xo3yRYejqhn40WcpSRTs96ddQK2yO3t SQIDFS3wPKhHa3gN2EPDmxqur3c+2qjCL0IUIsnRzB12yjPL7b8W9c4zqND68yxvRL7C L983k8tpbQXQsWxc5qmvkwQiLnSMHb15+BGqI= MIME-Version: 1.0 Received: by 10.216.144.22 with SMTP id m22mr314185wej.0.1286558483453; Fri, 08 Oct 2010 10:21:23 -0700 (PDT) Received: by 10.220.176.131 with HTTP; Fri, 8 Oct 2010 10:21:23 -0700 (PDT) In-Reply-To: References: Date: Fri, 8 Oct 2010 12:21:23 -0500 Message-ID: Subject: Re: Creating and using indices From: Jonathan Ellis To: user Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Oct 8, 2010 at 9:27 AM, Christian Decker wrote: > On Thu, Oct 7, 2010 at 6:25 PM, Jonathan Ellis wrote: >> No, LT[E] is not on the roadmap for primary index clauses (GT[E] is, >> for 0.7.1). =A0So you would want to create an index with an inverted >> comparator, to turn LTE into GTE. > > Hm, sounds rather strange, but that would mean that I'd either be able to > select GT[E] or LT[E], not combining both, right? So expressions like 123= < > uid < 321 would be completely impossible. No, you only need one primary index clause to avoid the full CF scan. After that you can have subordinate clauses on basically anything. so uid > 123 would be the primary and uid < 321 would be subordinate, and that would be fine. (just like now you can have uid=3D123 and x > foo.) > How would one proceed to create an > index with an inverted comparator? I'd have to create my own Sub-Type on > which I'd invert compare function. Right, although I think this would be common enough that we'd either provide reversed comparators or add a "reversed" option to the index definition. --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com