Search code examples
datastaxdatastax-enterprise

DSE Schema Creation: node workload is not compatible


I am currently trying to create a graph schema for a specific node to do queries on it. I attempted to following an example shown here and encountered the error stated in the title.

Property Keys Created

schema.propertyKey('id').Text().ifNotExists().create()
schema.propertyKey('name').Text().ifNotExists().create()
schema.propertyKey('age').Int().ifNotExists().create()
schema.propertyKey('location').Point().withGeoBounds().ifNotExists().create()
schema.propertyKey('gender').Text().ifNotExists().create()
schema.propertyKey('dob').Timestamp().ifNotExists().create()

The schema used is

schema.vertexLabel("people_node").index("search").by("name").asText().by("gender").by("location").by("dob").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index").materialized().by("id").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index")secondary().by("age").ifNotExists().add()

Example Data

id, name , age, location      , gender  , dob
0,  Betsy, 15 , POINT(10 15)  , F       , 1997-09-21T12:55:54+0400

Error Encountered

java.lang.IllegalArgumentException: Cannot create search index, node workdload is not compatible

Any advise on solving this will be greatly appreciate.


Solution

  • You need to start DSE with DSE Search enabled. Depending on the installation method it could be either:

    • for tarball install - pass the -s flag to the dse cassandra command
    • for package install - set SOLR_ENABLED=1 in the /etc/default/dse file and restart service