2

I generated solrschema with dsetool on a table name seriesdata (its key is composed by seriesmetadata_id, initialtime; two decimal field). These fields are defined as DecimalStrField but they are numeric valued (I have to execute range selection). I tried to change schema defining these fields as:

<fieldType class="org.apache.solr.schema.TrieLongField" name="TrieLongField"/>

but I receive this error:

[cassandra@bigdatalin-03 ~]$ dsetool reload_core timeseriesks.seriesdata schema=schema_data.xml solrconfig=solr_config_data.xml reindex=true -l cassandra -p cassandra org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: com.datastax.bdp.search.solr.CassandraIndexSchema$ValidationException: Mismatch between Solr key field [seriesmetadata_id] with type {TrieLongField{class=org.apache.solr.schema.TrieLongField,analyzer=org.apache.solr.schema.FieldType$DefaultAnalyzer,args={class=org.apache.solr.schema.TrieLongField}}] and Cassandra key alias [seriesmetadata_id] with type [decimal] at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:665) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:303) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:294) at com.datastax.bdp.tools.SearchDseToolCommands.createOrReloadCore(SearchDseToolCommands.java:559) at com.datastax.bdp.tools.SearchDseToolCommands.access$200(SearchDseToolCommands.java:59) at com.datastax.bdp.tools.SearchDseToolCommands$ReloadCore.execute(SearchDseToolCommands.java:209) at com.datastax.bdp.tools.DseTool.run(DseTool.java:126) at com.datastax.bdp.tools.DseTool.run(DseTool.java:51) at com.datastax.bdp.tools.DseTool.main(DseTool.java:186)

Why? Thanks a lot!

mustaccio
  • 28,207
  • 24
  • 60
  • 76
afmulone
  • 65
  • 4

1 Answers1

1

Since you're using Datastax Enterprise search nodes, solr is integrated with cassandra. What has happened here is that when you changed your solr schema, you did not change the associated cassandra schema. The error message is telling you that there is a mismatch between your new solr schema and the cassandra schema for the same table. Check the cassandra schema for seriesdata and make it consistent with the solr schema.

LHWizard
  • 261
  • 1
  • 4