我需要使用solr索引图形数据库(使用Cassandra作为后端的Titan)。可以这样做吗?
答案 0 :(得分:2)
根据其documentation,Titan支持使用Solr作为索引后端:
如果您在Titan中定义使用Solr作为索引后端的mixed index,则Titan会将该数据放入Solr进行索引。您仍然可以通过Solr直接访问该数据。 Titan文档中的示例仅显示如何通过图形访问数据,因为这是Titan的用途:图形。 Solr不会用于存储整个图形数据结构,只能用于存储混合索引的内容。
请参阅Titan文档,了解如何一起使用Titan和Solr。
答案 1 :(得分:1)
请记住,Solr只是一个扁平的文档集合。它并不关心这些文件之间的关系。
这是一起使用Cassandra和Solr的人的幻灯片分享
将数据发送给Cassandra,然后将其发送给Solr进行索引。 Solr支持Cassandra数据的全文搜索,即使Titan在混合中,这也是一个很好的用例。
答案 2 :(得分:1)
可以使用Solr作为Titan图数据库的索引后端。为此目的,应考虑一些不同的参数。这些参数如下。
# Configure a Solr backend named "search" at localhost:8983
# and path prefix /solr/titan.solr1.
# The collection must already exist -- see the manual for info.
# The indexing backend used to extend and optimize Titan's query
# functionality. This setting is optional. Titan can use multiple
# heterogeneous index backends. Hence, this option can appear more than
# once, so long as the user-defined name between "index" and "backend" is
# unique among appearances.Similar to the storage backend, this should be
# set to one of Titan's built-in shorthand names for its standard index
# backends (shorthands: lucene, elasticsearch, es, solr) or to the full
# package and classname of a custom/third-party IndexProvider
# implementation.
#
# Default: elasticsearch
# Data Type: String
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in Titan's
# storage backend. After starting the database for the first time, this
# file's copy of this setting is ignored. Use Titan's Management System
# to read or modify this value after bootstrapping.
index.search.backend=solr
# The operation mode for Solr which is either via HTTP (`http`) or using
# SolrCloud (`cloud`)
#
# Default: cloud
# Data Type: String
# Mutability: GLOBAL_OFFLINE
#
# Settings with mutability GLOBAL_OFFLINE are centrally managed in Titan's
# storage backend. After starting the database for the first time, this
# file's copy of this setting is ignored. Use Titan's Management System
# to read or modify this value after bootstrapping.
index.search.solr.mode=http
# List of URLs to use to connect to Solr Servers (LBHttpSolrClient is
# used), don't add core or collection name to the URLS.
#
# Default: http://localhost:8983/solr
# Data Type: class java.lang.String[]
# Mutability: MASKABLE
index.search.solr.http-urls=http://localhost:8983/solr/
请注意,这些参数名称中的"search"
部分应与应用程序中的索引名称相同。