Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B17A71874F for ; Wed, 10 Feb 2016 03:52:18 +0000 (UTC) Received: (qmail 13102 invoked by uid 500); 10 Feb 2016 03:52:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 13007 invoked by uid 500); 10 Feb 2016 03:52:18 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 12974 invoked by uid 99); 10 Feb 2016 03:52:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2016 03:52:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2FDB62C14F4 for ; Wed, 10 Feb 2016 03:52:18 +0000 (UTC) Date: Wed, 10 Feb 2016 03:52:18 +0000 (UTC) From: "Jon Haddad (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-11144) Allow indexes on materialized views MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jon Haddad created CASSANDRA-11144: -------------------------------------- Summary: Allow indexes on materialized views Key: CASSANDRA-11144 URL: https://issues.apache.org/jira/browse/CASSANDRA-11144 Project: Cassandra Issue Type: Bug Reporter: Jon Haddad Users should be able to create indexes on fields in materialized views. Here's an example of a user database. It would be good to be able to efficiently query the database for users born on a particular day with a particular name (or name starting with a certain letter). I've used SASI indexes since they support LIKE prefixes. {code} CREATE TABLE users ( id uuid PRIMARY KEY, first_name text, last_name text, birthday date ); CREATE MATERIALIZED VIEW users_by_date AS SELECT birthday, id, first_name, last_name FROM users WHERE birthday IS NOT NULL PRIMARY KEY (birthday, id) WITH CLUSTERING ORDER BY (id ASC); CREATE CUSTOM INDEX on users_by_date(first_name) USING 'org.apache.cassandra.index.sasi.SASIIndex'; {code} And I get back {code} InvalidRequest: code=2200 [Invalid query] message="Secondary indexes are not supported on materialized views" {code} I think the index is valid, since it'll allow me to take advantage of querying a single partition, and the index allows me to find arbitrary rows within that partition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)