タイタンでlucene
検索バックエンドを使用しようとしています。 index.search.backend
プロパティをlucene
に設定しています。Titan - 'Lucene'の使い方検索バックエンド
TitanFactory.Builder config = TitanFactory.build();
config.set("storage.backend", "hbase");
config.set("storage.hostname", "node1");
config.set("storage.hbase.table", "titan");
config.set("index.search.backend", "lucene");
config.set("index.search.directory", "/tmp/foo");
TitanGraph graph = config.open();
GraphOfTheGodsFactory.load(graph);
graph.getVertices().forEach(v -> System.out.println(v.toString()));
もちろん、この設定はGLOBAL_OFFLINE
であるため、この設定は機能しません。ログは私にこれを知らせる。 Titanは私の 'lucene'設定を無視して、Elasticsearchを検索バックエンドとして使用しようとします。
WARN com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration
- Local setting index.search.backend=lucene (Type: GLOBAL_OFFLINE)
is overridden by globally managed value (elasticsearch). Use
the ManagementSystem interface instead of the local configuration to control
this setting.
は、いくつかの読書の後、私はindex.search.backend
を設定するには、管理システムを使用する必要があることを理解しています。次のようなコードが必要です。
graph.getManagementSystem().set("index.search.backend", "lucene");
graph.getManagementSystem().set("index.search.directory", "/tmp/foo");
graph.getManagementSystem().commit();
私は上記の元のコード例でこれをどのように統合するのか混乱しています。これはGLOBAL_OFFLINE
の設定なので、開いたグラフでは設定できません。同時に、最初にグラフを開くまでグラフを取得する方法がわかりません。検索バックエンドを正しく設定するにはどうすればよいですか?
私はこの問題に関連するhttps://github.com/thinkaurelius/titan/issues/1332 –
を開いたあなたは正しいが、私は間違っている。 Luceneを使うと同じことが起こります。これをキャッチするためにありがとう。私は質問を更新します。 –
HBaseテーブルを削除しましたか? –