Phantom: Create custom index and queries?

52 Views Asked by At

I'm using Cassandra and Phantom as Scala DSL and driver.

Now, I would like to use Cassandra Lucene Index as Cassandra plugin. They provide a Lucene-based secondary index that can be created this way:

CREATE CUSTOM INDEX tweets_index ON tweets ()
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
   'refresh_seconds': '1',
   'schema': '{
      fields: {
         id: {type: "integer"},
         user: {type: "string"},
         body: {type: "text", analyzer: "english"}
      }
   }'
};

Unfortunately, I've not found a way yet to create such an index using Phantom as DSL. So I'd like to ask here if it's possible at all using Phantom or if I have to use raw CQL statements or the Java API for Cassandra?

Also I guess it's not possible to use Phantom for querying the Lucene index?

0

There are 0 best solutions below