Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 2D884104FD for ; Mon, 24 Feb 2014 15:20:38 +0000 (UTC) Received: (qmail 27716 invoked by uid 500); 24 Feb 2014 15:20:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 27659 invoked by uid 500); 24 Feb 2014 15:20:34 -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 27642 invoked by uid 99); 24 Feb 2014 15:20:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 15:20:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of woolfel@gmail.com designates 209.85.220.179 as permitted sender) Received: from [209.85.220.179] (HELO mail-vc0-f179.google.com) (209.85.220.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 15:20:28 +0000 Received: by mail-vc0-f179.google.com with SMTP id lh14so5984399vcb.10 for ; Mon, 24 Feb 2014 07:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tU0nI2eSrYbqPbDsmg9ypHOpfHTzcbse8GODc6qMPO4=; b=sKm0XxtJQYL44o2o3q2hK0MZM13keiRkxtKSrH4a+tB3vgKaB/Izb5kizcllecRzxN ml6TQUdpCgeVXVUSXhJGmL8AqXuL6E/6eRg79LkeD+spLjDH7CDwWxRwGbhkNBi7w/Yd W9fb9s+ixpexcnMqf8ZHsyTI7eRtLpVnJ0U3yi8YgRhW26iByZJsoJK2n73rqV2334if H8OZt18B6sGM5/SXYL7FuqdG6TW21pbo3SL8ExRuS8dt8lWh5jRsGZfp/0FnWLt3uWN+ 8Ov6cXuQXtOvXhkHf6AGhtHNryadHd8bVRMPNDprZU23EfP/Df1PYpUQjxJvIpsKg4UM /mDw== MIME-Version: 1.0 X-Received: by 10.53.8.166 with SMTP id dl6mr582089vdd.60.1393255207259; Mon, 24 Feb 2014 07:20:07 -0800 (PST) Received: by 10.221.17.198 with HTTP; Mon, 24 Feb 2014 07:20:07 -0800 (PST) Date: Mon, 24 Feb 2014 10:20:07 -0500 Message-ID: Subject: Are indexes replicated to all nodes? From: Peter Lin To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=001a1133c8dcb5d29604f328817b X-Virus-Checked: Checked by ClamAV on apache.org --001a1133c8dcb5d29604f328817b Content-Type: text/plain; charset=ISO-8859-1 I was looking at the indexing code in Cassandra server and couldn't determine if the indexes use the same replication factor as the keyspace. When I print out the details of the keyspace, it correctly show the replication factor, which "suggests" the index for a given partition only lives on the same node. I ask for a couple of reasons. Sometimes, users may want to be able to run queries like these. select * from MyColumnFamily where Column1='some1' or Column4='other1' select * from MyColumnFamily where Column2 like '%OOP%' and Column5 like '%architect%' In our tooling, we've integrated Solr, so that we can do queries like this with our query API. The query API looks like JPA/Hibernate, so we off load the work to Solr when needed. If the indexes were replicated to all nodes (aka partitions), Cassandra server could then use index joins and return the results to the client. The client can then merge the results. What we do now is we query Solr to get the list of keys and then query cassandra for the records by key. anyone know the answer off hand? thanks peter --001a1133c8dcb5d29604f328817b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

I was looking at the in= dexing code in Cassandra server and couldn't determine if the indexes u= se the same replication factor as the keyspace. When I print out the detail= s of the keyspace, it correctly show the replication factor, which "su= ggests" the index for a given partition only lives on the same node.
I ask for a couple of reasons. Sometimes, users may want to be able to = run queries like these.

select * from MyColumnFamily where Column1= =3D'some1' or Column4=3D'other1'

select * from= MyColumnFamily where Column2 like '%OOP%' and Column5 like '%a= rchitect%'

In our tooling, we've integrated Solr, so that we can do quer= ies like this with our query API. The query API looks like JPA/Hibernate, s= o we off load the work to Solr when needed. If the indexes were replicated = to all nodes (aka partitions), Cassandra server could then use index joins = and return the results to the client.=A0 The client can then merge the resu= lts.

What we do now is we query Solr to get the list of keys and = then query cassandra for the records by key.

anyone= know the answer off hand?

thanks

peter
--001a1133c8dcb5d29604f328817b--