1

what is the best way to use Solr in Datastax graph database. so, currently we have 4 node cluster where 3 nodes are DSE and 1 node is serving as Solr instance.

now, currently we are using Solr web service to integrate Solr in our backend code where we use gremlin to talk to our DSE.

Now, we are about to add one more Solr instance to cluster and using Solr webservice seems to be not a good option as we will have multiple urls to access the right index.

what is the best way to integrate Solr when you are using Gremlin on Datastax at your backend.

Uttkarsh Jain
  • 228
  • 1
  • 12

1 Answers1

1

There are several things here:

  1. Your nodes have different workload enabled inside the same data center. You need to enable both Graph & Search workload for all nodes inside the data center. See this answer for similar question.
  2. You can use DSE Search directly from Gremlin, without explicit specification of the Tomcat URLs. You just need to create a search index on the corresponding properties, and then use operations like token, regex, etc. See corresponding part of DSE Graph documentation;
  3. Even without Gremlin, you can use most of DSE Search functionality from CQL directly, without knowing anything about web service URLs - you just need to use solr_query for specification of the query, or just use SELECT ... FROM ... WHERE col LIKE 'text%'; in version of DSE 6.x.
Alex Ott
  • 80,552
  • 8
  • 87
  • 132
  • Hey @Alex thanks for the answer. so if I understand correctly, we are having different workload in same datacenter it should be enabled on all the nodes. and if we are doing workload segregation than we can different workloads enable on different datacenters. Say graph on one datacenter and Solr on another datacenter. – Uttkarsh Jain Dec 28 '19 at 10:12
  • Yes - you need to have all nodes in DC have the same workload. Regarding workload separation - I'm not 100% sure (I don't work with Graph very often), but if I remember correctly that right now you need to have Graph & Search in the same DC, as DSE Search is local to specific data center, and if there is no index in Graph DC, DSE simply won't find data, although query won't fail. – Alex Ott Dec 28 '19 at 10:47