I've been trying to set up Solr with Cassandra and ran into an issue. I've been following this tutorial: http://docs.datastax.com/en/archived/datastax_enterprise/4.0/datastax_enterprise/srch/srchTutCreatTab.html. I know it's outdated but I assumed it would still work as I am on Cassandra 3.10 (maybe this is why I'm running into my issue?). Anyways, I created a new keyspace (CREATE KEYSPACE stacko WITH REPLICATION ={'class':'NetworkTopologyStrategy', 'datacenter1':1};
) and table (CREATE TABLE test1 ( name text PRIMARY KEY, address text, age int, solr_query text);
). I then proceeded to add 4 rows to the database successfully.
My schema.xml looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schema name="TestSolrSchema" version="1.5">
<types>
<fieldType class="org.apache.solr.schema.StrField" name="StrField"/>
<fieldType class="org.apache.solr.schema.TrieIntField"
name="TrieIntField"/>
</types>
<fields>
<field docValues="true" indexed="true" multiValued="false" name="name" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="address" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="age" stored="true" type="TrieIntField"/>
</fields>
<uniqueKey>name</uniqueKey>
</schema>
The solrconfig.xml looks like how it was when downloaded from Datastax (no changes made to it).
I then proceeded to run these lines: $ cd into/directory
$ curl http://localhost:8983/solr/resource/stacko.test1/solrconfig.xml --data-binary @solrconfig.xml -H 'Content-type:text/xml; charset=utf-8'
$ curl http://localhost:8983/solr/resource/stacko.test1/schema.xml --data-binary @schema.xml -H 'Content-type:text/xml; charset=utf-8'
$ curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=stacko.test1"
However, when I open the Solr Admin portal and go to my Core Admin page, I see this:
I cannot perform any queries as there is no data to query apparently... Any reason as to why this may be happening? I haven't been able to figure it out. Please let me know if you need any more information.
you need to tell DSE to reindex the content into Solr, look up the doc for details, but typically would be something like this:
curl "http://localhost:8983/solr/admin/cores?action=RELOAD&name=stacko.test1&reindex=true&deleteAll=true"