solrdatastaxdatastax-enterprisedatastax-enterprise-graphdatastax-search

Best way to access Solr using gremlin in datastax graph


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.


Solution

  • 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.