gpt4 book ai didi

solr - 将 JanusGraph 与 Solr 结合使用

转载 作者:行者123 更新时间:2023-12-05 03:07:45 25 4
gpt4 key购买 nike

设置 JanusGraph 我在控制台中注意到以下内容:

09:04:12,175  INFO ReflectiveConfigOptionLoader:173 - Loaded and initialized config classes: 10 OK out of 12 attempts in PT0.023S
09:04:12,230 INFO Reflections:224 - Reflections took 28 ms to scan 1 urls, producing 2 keys and 2 values
09:04:12,291 WARN GraphDatabaseConfiguration:1445 - Local setting index.search.index-name=entity (Type: GLOBAL_OFFLINE) is overridden by globally managed value (janusgraph). Use the ManagementSystem interface instead of the local configuration to control this setting.
09:04:12,294 WARN GraphDatabaseConfiguration:1445 - Local setting index.search.backend=solr (Type: GLOBAL_OFFLINE) is overridden by globally managed value (elasticsearch). Use the ManagementSystem interface instead of the local configuration to control this setting.
09:04:12,300 INFO CassandraThriftStoreManager:628 - Closed Thrift connection pooler.

然后我看到以下内容:

Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.es.ElasticSearchIndex

如何停止使用 elasticsearch 并切换到 Solr?

我的属性文件如下:

index.search.backend=solr
index.search.directory=/path/to/directory/for/solr/index/something
index.search.index-name=something
index.search.solr.mode=http
index.search.solr.http-urls=http://127.0.0.1:8983/solr
storage.backend=cassandrathrift

storage.hostname=127.0.0.1
cache.db-cache = true

cache.db-cache-clean-wait = 20

cache.db-cache-time = 180000

cache.db-cache-size = 0.25

最佳答案

这个答案和this one基本一样对于泰坦。 JanusGraph 是从 Titan fork 出来的。

您可能正在尝试连接到之前配置为使用 Elasticsearch 的现有图表。默认情况下,键空间名为 janusgraph

1) 您可以通过更新 conf/janusgraph-cassandra.properties

连接到不同的 key 空间
gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
storage.cassandra.keyspace=mygraph

2) 您可以删除现有的键空间。如果您使用快速启动说明中的 bin/janusgraph.sh start(启动单节点 Cassandra 和单节点 Elasticsearch),

bin/janusgraph.sh clean

或者如果您安装了独立的 Cassandra:

$CASSANDRA_HOME/bin/cqlsh -e 'drop keyspace if exists janusgraph'

然后您就可以使用默认的 conf/janusgraph-cassandra.properties 进行连接。

关于solr - 将 JanusGraph 与 Solr 结合使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46545611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com