【问题标题】:Cassandra with Stratio lucene indexCassandra 与 Stratio lucene 索引
【发布时间】:2015-12-07 07:14:59
【问题描述】:

我已经在我的机器上安装了 Data-Sax Cassandra 社区版(2.2.3),我想使用全文搜索。 我已经下载了 Stratio lucene index 2.2.3 并将其复制到 Cassandra lib 文件夹,但是当我执行以下命令创建索引时

   CREATE CUSTOM INDEX tweets_index ON tweets (lucene)
   USING 'com.stratio.cassandra.lucene.Index'
   WITH OPTIONS = {
  'refresh_seconds' : '1',
  'schema' : '{
    fields : {
        id    : {type : "integer"},
        user  : {type : "string"},
        body  : {type : "text", analyzer : "english"},
        time  : {type : "date", pattern : "yyyy/MM/dd", sorted : true},
        place : {type : "geo_point", latitude:"latitude",    longitude:"longitude"}
    }
}'
};

我得到异常ServerError:

    ErrorMessage code=0000 [Server error] message="java.lang.RuntimeEx
   ception: java.lang.ClassNotFoundException:    
    com.stratio.cassandra.lucene.Index"

我也尝试使用 maven 构建它并更新安装,但没有成功。此外,我将 jar 文件复制到我的 JDK ext 文件夹并再次尝试,但没有成功。

干杯, 杰瑞斯

【问题讨论】:

  • 使用 2.2.3 版本有什么具体原因吗?如果不切换到最新版本,您可以创建一个使用底层 CFS 存储索引的 Solr 节点,并且速度更快。
  • @mbaxi , 2.2.3 是稳定版吧?
  • 是的,对不起,我对提供与 Solr 的内置集成的企业版 (v4.8) 感到困惑。

标签: cassandra lucene full-text-search stratio cassandra-lucene-index


【解决方案1】:

您确定已将正确的索引 JAR 文件复制到 Cassandra 的 lib 路径中吗?

您可以通过这种方式下载、构建和修补您的 Cassandra 安装:

git clone https://github.com/Stratio/cassandra-lucene-index.git
cd cassandra-lucene-index
git checkout 2.2.3.2
cd mvn clean package -Ppatch -Dcassandra_home=<PATH_TO_CASSANDRA>

请确保&lt;PATH_TO_CASSANDRA&gt; 包含以下内容:

CHANGES.txt     
lib
LICENSE.txt
conf
logs
NEWS.txt
data
pylib
NOTICE.txt
interface
switch_snappy
bin
javadoc
tools

否则,您可以从http://downloads.datastax.com/community/dsc-cassandra-2.2.3-bin.tar.gz下载DSC社区2.2.3

希望对你有帮助。

【讨论】:

  • 是的,我做到了当从批处理文件启动 Cassandra 时,它似乎正在工作。但如果我启动 Datasax Cassandra 社区服务器服务,似乎没有选择
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-06-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多