2
votes

Currently working with Cassandra in Solr mode and started running Cassandra in Solr.

using dse 4.7
cassandra 2.1.8

./dsetool create_core vin_service_development.vinid_search1 generateResources=true reindex=true

Created indexes successfully and able to see the table under Core Selector Select list in http://10.14.210.22:8983/solr/#/

Changed the schema.xml field type from "TextField" to "StrField" and want to reload the changes made to schema.xml file. After executing the below command.

./dsetool reload_core vin_service_development.vinid_search1 reindex=true solrconfig=solr.xml

solr.xml is placed in the same path of dsetool.

Error Info:

brsblcdb012:/apps/apg-data.cassandra/bin ./dsetool reload_core vin_service_development.vinid_search1 reindex=true solrconfig=solr.xml
WARN  20:21:14 Error while computing token map for datacenter datacenter1: could not achieve replication factor 1 (found 0 replicas only), check your keyspace replication settings. Note that this can affect the performance of the driver.
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Error in xpath:/config/luceneMatchVersion for solrconfig.xml
        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:383)
        at com.datastax.bdp.tools.SearchDseToolCommands.access$200(SearchDseToolCommands.java:53)
        at com.datastax.bdp.tools.SearchDseToolCommands$ReloadCore.execute(SearchDseToolCommands.java:201)
        at com.datastax.bdp.tools.DseTool.run(DseTool.java:114)
        at com.datastax.bdp.tools.DseTool.run(DseTool.java:51)
        at com.datastax.bdp.tools.DseTool.main(DseTool.java:174)

Is this the correct way to re-load the core in Solr after making changes to the xml files?

Updated: One of my keyspace was using NetworkTopologyStrategy earlier. Fixed this to SimpleStrategy. Now all the keyspaces have SimpleStrategy in the datacenter Solr. After executing the same command, got this error.

brsblcdb012:/apps/apg-data.cassandra/bin ./dsetool reload_core vin_service_development.vinid_search1 reindex=true solrconfig=solr.xml
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Error in xpath:/config/luceneMatchVersion for solrconfig.xml
        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:383)
        at com.datastax.bdp.tools.SearchDseToolCommands.access$200(SearchDseToolCommands.java:53)
        at com.datastax.bdp.tools.SearchDseToolCommands$ReloadCore.execute(SearchDseToolCommands.java:201)
        at com.datastax.bdp.tools.DseTool.run(DseTool.java:114)
        at com.datastax.bdp.tools.DseTool.run(DseTool.java:51)
        at com.datastax.bdp.tools.DseTool.main(DseTool.java:174)

what would be the recommended change now?

1

1 Answers

2
votes

To sum up the conversation:

The keyspace replication configuration was initially wrong (updated to SimpleStrategy RF2):

Your nodes are now in Datacenter 'Solr' but one of your keyspaces is configured with NetworkTopologyStrategy and a replication factor referencing 'datacenter1'.

You had accidentally replaced your solrconfig with the wrong XML which caused this error. To fix this you can recreate your solr core.

In DSE 4.8 you can remove your solr core using unload_core and recreate it. If on an older verison of DSE you can follow 'Remove core from Datastax Solr'.