Question

  1. I start my DSE node as Solr node i.e. /dse cassandra -s
  2. I then create KS and CF. My CF has KEY field only.
  3. I then publish Solr schema and solr config on it. My Solr schema has dynamic field which is indexed and multivalued.
  4. I then try to insert data into CAS on cql command prompt, something like below:-

insert into device (KEY, deviceid, qualifier0) VALUES (000000000000, '000000000000', ['v0', 'v1']);

it throw error, says - Invalid character '['.

Questions -

  1. Are multivalue fields supported in DSE?
  2. If yes then how can I use them?

Thanks.

Was it helpful?

Solution

If you are going to used advanced Solr features, you really should be inserting the data using the Solr HTTP API, not CQL. But, I think you can insert into the multi valued field like so:

insert into device (KEY, deviceid, qualifier0) VALUES (000000000000, '000000000000', 'solrjson:[\'v0\',\'v1\']');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top