我已经在我的机器上安装了Data-Sax Cassandra社区版(2.2.3),并且我想使用全文搜索。我已经下载了Stratio lucene索引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文件夹中,并再次尝试,但没有成功。
干杯,jereesh
发布于 2015-12-13 00:18:04
您确定您已经将正确的索引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>请确保<PATH_TO_CASSANDRA>包含以下内容:
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。
我希望它能帮上忙。
https://stackoverflow.com/questions/34128257
复制相似问题