Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 171 forks source link

Class not found exception while creating index #71

Closed jereesh closed 8 years ago

jereesh commented 8 years ago

Tried with DataSax Cassandra community Edition 2.2.3 and followed the steps mentioned in the document but get the following error.

cqlsh:jpos> CREATE CUSTOM INDEX tweets_index ON tweets (lucene) ... USING 'com.stratio.cassandra.lucene.builder.index.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", sorte d : true}, ... place : {type : "geo_point", latitude:"latitude", lon gitude:"longitude"} ... } ... }' ... }; ServerError: ErrorMessage code=0000 [Server error] message="java.lang.RuntimeEx ception: java.lang.ClassNotFoundException: com.stratio.cassandra.lucene.builder. index.Index"

adelapena commented 8 years ago

Hi, As you can read in the current documentation, the name of the index class is com.stratio.cassandra.lucene.Index, instead of com.stratio.cassandra.lucene.builder.index.Index. This last is the class used by the Java query builder.

jereesh commented 8 years ago

The issue is resolved , Initially I used only the com.stratio.cassandra.lucene.Index, but got the error. I just restarted the Cassandra Community Server service only . When I ran the Cassandra batch file it is working. Thank you.