Cassandra定制二级索引 [英] Cassandra Custom Secondary Index

查看:86
本文介绍了Cassandra定制二级索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据官方文档,可以使用自定义索引器类在列上创建索引

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';

但是我找不到有关要实现/扩展的接口/类的任何文档,并且如何配置cassandra以查找类?

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.

推荐答案

这是我发现的 https://issues.apache.org/jira/browse/CASSANDRA-6480
因此,您必须实现 org.apache.cassandra.db.index的子类.SecondaryIndex 并确保该类在您的Cassandra的类路径上

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

这篇关于Cassandra定制二级索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆