简体   繁体   English

在 datastax 图中使用 gremlin 访问 Solr 的最佳方法

[英]Best way to access Solr using gremlin in datastax graph

what is the best way to use Solr in Datastax graph database.在 Datastax 图形数据库中使用 Solr 的最佳方法是什么。 so, currently we have 4 node cluster where 3 nodes are DSE and 1 node is serving as Solr instance.因此,目前我们有 4 个节点集群,其中 3 个节点是 DSE,1 个节点用作 Solr 实例。

now, currently we are using Solr web service to integrate Solr in our backend code where we use gremlin to talk to our DSE.现在,目前我们正在使用 Solr Web 服务将 Solr 集成到我们的后端代码中,我们使用 gremlin 与我们的 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.现在,我们将再添加一个 Solr 实例到集群中,使用 Solr webservice 似乎不是一个好的选择,因为我们将有多个 url 来访问正确的索引。

what is the best way to integrate Solr when you are using Gremlin on Datastax at your backend.当您在后端在 Datastax 上使用 Gremlin 时,集成 Solr 的最佳方法是什么。

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.您可以直接从 Gremlin 使用 DSE 搜索,而无需明确指定 Tomcat URL。 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 ;您只需要在相应的属性上创建一个搜索索引,然后使用tokenregex等操作。请参阅DSE Graph 文档的相应部分
  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%';即使没有 Gremlin,您也可以直接使用 CQL 中的大部分 DSE 搜索功能,而无需了解有关 Web 服务 URL 的任何信息 - 您只需要使用solr_query指定查询,或者只需使用SELECT ... FROM ... WHERE col LIKE 'text%'; in version of DSE 6.x.在 DSE 6.x 版本中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM