You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nick Jacobsen (JIRA)" <ji...@apache.org> on 2017/02/10 10:54:41 UTC

[jira] [Commented] (CASSANDRA-11954) Generalize SASI indexes

    [ https://issues.apache.org/jira/browse/CASSANDRA-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861099#comment-15861099 ] 

Nick Jacobsen commented on CASSANDRA-11954:
-------------------------------------------

I'd be excited to see this happen...

> Generalize SASI indexes
> -----------------------
>
>                 Key: CASSANDRA-11954
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11954
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths, sasi
>            Reporter: Andrés de la Peña
>            Priority: Minor
>              Labels: 2i, sasi, secondary_index
>             Fix For: 3.11.x
>
>
> It would be great to independize SASI indexes from their underlying index structure and query syntax. This way it would be easy to create new custom SSTable attached index implementations for specific use cases. 
> The API could consist on two of interfaces, one for on-memory indexes and other for on-disk indexes, implemented by users and invoked by Cassandra when there are row writes, SSTable flushes, compactions, etc.
> As an example, the API could be used to build an efficient SASI geospatial index based on R-trees:
> {code}
> CREATE TABLE locations (
>     id text,
>     date timeuuid,
>     location tuple<double, double>,
>     PRIMARY KEY (id, date)
> );
> CREATE CUSTOM INDEX idx ON locations () USING '...' WITH OPTIONS = {...};
> INSERT INTO locations (id, date, location) VALUES ('alice', now(), (-0.18676, 51.66870));
> SELECT * FROM locations WHERE expr(idx, 'POLYGON((-0.25 51.76, -0.25 51.54, -0.027 51.65, -0.25 51.76))');
> {code}
> Also, custom SASI indexes predicates could be combined with regular SASI indexes predicates in the same query, which would be very nice.
> What do you think? Does it make any sense?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)