Cassandra Custom Secondary Index

我怕爱的太早我们不能终老 提交于 2020-01-03 17:49:10

问题


This seems to be a mystery in cassandra, According to official documentation, one can create index on a column by using a custom indexer class

CREATE CUSTOM INDEX ON users (email) USING 'path.to.the.IndexClass';

But I could not find any documentation regarding the interface/class to be implemented/extended to do this and how to configure cassandra to find the class?

I wanted to write a custom indexer which could skip indexing rows based on conditions/options.


回答1:


Here what I've found https://issues.apache.org/jira/browse/CASSANDRA-6480 So you have to implement a subclass of org.apache.cassandra.db.index.SecondaryIndex and make sure that class is on the classpath for your Cassandra




回答2:


Here you can find example of implementation:

http://tuplejump.github.io/stargate/

https://github.com/tuplejump/stargate-core




回答3:


Stratio's Cassandra Lucene Index is a plugin which supports custom indexes in cassandra, you can find the required documentation on how to work with custom indexes.



来源:https://stackoverflow.com/questions/22449800/cassandra-custom-secondary-index

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!