Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 11866 invoked from network); 1 Oct 2010 15:56:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 15:56:06 -0000 Received: (qmail 488 invoked by uid 500); 1 Oct 2010 15:56:04 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 405 invoked by uid 500); 1 Oct 2010 15:56:01 -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 397 invoked by uid 99); 1 Oct 2010 15:56:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 15:56:01 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of petr.odut@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qy0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 15:55:55 +0000 Received: by qyk7 with SMTP id 7so943143qyk.10 for ; Fri, 01 Oct 2010 08:55:34 -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; bh=gI0VOREsqlc6ELX3v7PVx3176hKTC4sXVrqziQTFzGE=; b=gsY+icyCBbezQmNXc1seCQrBNrXLmLDEQacMHZT6ubRPS2+ULUsn+7wZiILexcNpLb 6zyYFfbPtgN35nJ+dzXyNV9CCnDHx4IJJM0axEPrjE2iQg8Y5VMkRWkowb0nfD5OpKP0 98nKDM7DbzeVPeikBTRtI+/H/tf8heBB8jcaU= 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; b=Ype2UMIzVvIJatcZe7LoGP7MqBpCO2ieH8oefSiTolOAjmx4Eo840LXZuubWbCAlQm 8Txziold/hWjBxm8ftujwjcDjY/N05YBSnroa7unHcIsrlGIKAvXi4r7vzbrC7YAdKi+ wH2nHR1A4QMbsQlahXpbeWMRoLo0TdxRlt9I8= MIME-Version: 1.0 Received: by 10.229.51.213 with SMTP id e21mr3754383qcg.225.1285948534515; Fri, 01 Oct 2010 08:55:34 -0700 (PDT) Received: by 10.229.110.4 with HTTP; Fri, 1 Oct 2010 08:55:34 -0700 (PDT) In-Reply-To: References: Date: Fri, 1 Oct 2010 17:55:34 +0200 Message-ID: Subject: Re: Sorting by secondary index From: Petr Odut To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016364edb5e99692a04919039eb --0016364edb5e99692a04919039eb Content-Type: text/plain; charset=ISO-8859-1 OK, I have a query with 2 expressions: 1st: with GTE operator 2nd: with EQ operator both columns are indexed, but results are sorted in token order (I should expect to be sorted by 1st expression column values). Am I correct? On Fri, Oct 1, 2010 at 5:18 PM, Jonathan Ellis wrote: > secondary index results are always sorted by indexed column value. > rows with the same index value are sorted in token order (although > support for comparator order is planned). > > sorting by a different column is not possible to do efficiently > server-side and therefore is left to the client. > > On Fri, Oct 1, 2010 at 10:13 AM, Petr Odut wrote: > > Hi, > > is it possible to sort results based on secondary index search? > > Typical use case is to get most recent comments from specified group > > CF: comments > > * SI: group > > * SI: timestamp > > I've asked before, but I can't still found any information. > > Thanks > > -- > > Petr Odut [petr.odut@gmail.com] > > > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of Riptano, the source for professional Cassandra support > http://riptano.com > -- Petr Odut [petr.odut@gmail.com] --0016364edb5e99692a04919039eb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable OK,
I have a query with 2 expressions:
1st: with GTE operator=
2nd: with EQ operator

both columns are = indexed, but results are sorted in token order (I should expect to be sorte= d by 1st expression column values).
Am I correct?

On F= ri, Oct 1, 2010 at 5:18 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
secondary index results are always sorted by indexed column value.
rows with the same index value are sorted in token order (although
support for comparator order is planned).

sorting by a different column is not possible to do efficiently
server-side and therefore is left to the client.

On Fri, Oct 1, 2010 at 10:13 AM, Petr Odut <petr.odut@gmail.com> wrote:
> Hi,
> is it possible to sort results based on secondary index search?
> Typical use case is to get most recent comments from specified group > CF: comments
> =A0* SI: group
> =A0* SI: timestamp
> I've asked before, but I can't still found any information. > Thanks
> --
> Petr Odut [petr.odut@gmail.com<= /a>]
>



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com



--
Petr Odut [petr.odut@gmail.com]
--0016364edb5e99692a04919039eb--