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

T Jake Luciani commented on CASSANDRA-2982:
-------------------------------------------

Sure. I've abstracted the index management for a column family to 
SecondaryIndexManager. For a particular column a index type can be specified 
that is implemented by a SecondaryIndex subclass. 

Index building and updating works the same but is now encapsulated by this API. 
The search API is abstracted by a custom SecondaryIndexSearcher subclass which 
handles searching a IndexClause for columns of a specific index type. 

This does not support searching across index types so all queries must accept 
index expressions of the same index type. Otherwise you get an exception. 

The one thing I might change is not exposing the cfs indexmanager variable and 
instead expose all the index manager calls as part of the Cfs API that 
delegates to indexmanager. 

> Refactor secondary index api
> ----------------------------
>
>                 Key: CASSANDRA-2982
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2982
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: T Jake Luciani
>            Assignee: T Jake Luciani
>             Fix For: 1.0
>
>         Attachments: 2982-v1.txt
>
>
> Secondary indexes currently make some bad assumptions about the underlying 
> indexes.
> 1. That they are always stored in other column families.
> 2. That there is a unique index per column
> In the case of CASSANDRA-2915 neither of these are true.  The new api should 
> abstract the search concepts and allow any search api to plug in.
> Once the code is refactored and basically pluggable we can remove the 
> IndexType enum and use class names similar to how we handle partitioners and 
> comparators.
> Basic api is to add a SecondaryIndexManager that handles different index 
> types per CF and a SecondaryIndex base class that handles a particular type 
> implementation.
> This requires major changes to ColumnFamilyStore and Table.IndexBuilder

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to