我正在尝试安装 Graph-Aided Search 以将 Neo4j 与 ElasticSearch (2.3.1) 集成,如此处所示。但我正在努力用 curl 定义索引。
当我尝试像这样的任何 curl 命令时:
curl -XPUT http://localhost:9200/Person/_settings?index.gas.neo4j.user=neo4j
我收到此错误消息:
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"Person","index":"Person"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"Person","index":"Person"},"status":404}
让我们以电影数据库(Movie,Person)为例。我怎样才能定义和配置Neo4j
索引Movie
,Person
所以我可以用它们来调用它们Elasticsearch
?
更新
例如,当这样做时:
CURL XGET http://localhost:9200/person/_search?pretty=true
我得到这个结果:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
但实际上我期望的是返回所有Person
节点。如何告诉person
索引Elasticsearch
指向Person
节点Neo4j
?
这些是person
索引的设置:
curl XGET http://localhost:7474/person/_settings?pretty
{
"person" : {
"settings" : {
"index" : {
"gas" : {
"enable" : "false",
"neo4j" : {
"user" : "neo4j",
"hostname" : "http://localhost:7474",
"password" : "neo4j."
}
},
"creation_date" : "1495006378748",
"number_of_shards" : "5",
"number_of_replicas" : "1",
"uuid" : "PuNk1GskRrW5_1BbGGWPiA",
"version" : {
"created" : "2030299"
}
}
}
}
}