Reputation: 3832
I have an existing Datastax Cassandra cluster that I am just experimenting with currently. Cassandra itself was very easy to get going and is working very well. However, I honestly can't seem to figure out how to get Solr Searching working.
I am supposed to have a solrconfig.xml file however I don't seem to have that anywhere on the machine. Solr and cassandra certainly appear to be installed correctly.
I tried a solr_query request which does not work. I tried it connected to a normal node and a Solr node with the same results.
test.user@cqlsh:Datafyer> select "Title" from "Table" where solr_query = 'title:test*';
InvalidRequest: Error from server: code=2200 [Invalid query] message="Undefined name solr_query in where clause ('solr_query = 'title:test*'')"
I have indeed verified that on the search node SOLR_ENABLED=1. And the node itself is part of the system as you can see below.
administrator@dse-search-qa01:/usr/share/dse$ nodetool ring
Datacenter: Analytics
==========
Address Rack Status State Load Owns Token
10.10.98.7 rack1 Up Normal 325.86 KB ? -7438423332917368512
Datacenter: Cassandra
==========
Address Rack Status State Load Owns Token
6175281243369380764
10.10.98.3 rack1 Up Normal 441.55 KB ? 4412916390327649050
10.10.98.5 rack1 Up Normal 442.44 KB ? 4563214312080485226
10.10.98.1 rack1 Up Normal 451.64 KB ? 6175281243369380764
Datacenter: Solr
==========
Address Rack Status State Load Owns Token
10.10.98.9 rack1 Up Normal 447.89 KB ? -8974470140210234803
Upvotes: 0
Views: 1222
Reputation: 1653
It looks like you didn't create the indices for 'solr_query' to work. If you're just experimenting, you can simply run:
dsetool create_core <keyspace>.<table> generateResources=true reindex=true
(for more options, see: https://docs.datastax.com/en/datastax_enterprise/5.0/datastax_enterprise/tools/dsetool.html )
This will create the Solr config and schema XML files for you, as well as index the data already at rest. By default, this will index all columns and do auto-type detection to create the respective indices.
When you're ready to get more in depth with DSE Search, I recommend checking out this course: https://academy.datastax.com/resources/ds310-datastax-enterprise-search
Best, Marc
Upvotes: 1