我將把我的Neo4j應用程序與Elasticsearch集成。我要從GraphAware下面試試下面的Neo4j插件https://github.com/graphaware/neo4j-to-elasticsearchNeo4j 3.1.3與Elasticsearch集成
請問是否支持Neo4j 3.1.3版本?另外,ES應該使用哪個版本?例如,它是否支持ES 5.3.0?
現在我已經在本地安裝了Elasticsearch 5.3.0。我還添加了2個罐子:
graphaware-neo4j-to-elasticsearch-3.1.3.45.7.jar
graphaware-server-community-all-3.1.3.46.jar
到我的Neo4j CE 3.1.3\plugins\
文件夾。
另外,我還增加了以下配置(如這裏descrbed https://github.com/neo4j-contrib/neo4j-elasticsearch#example)線到我的數據庫配置(Neo4j Community Edition\neo4j.conf
):
elasticsearch.host_name=http://localhost:9200
elasticsearch.index_spec=decisions:Decision(name,description)
但是當我通過彈簧數據Neo4j的項目沒有插入數據發生。 。Elasticsearch索引仍然是空的。
我在做什麼錯誤,以及如何使它工作?
修訂
我做了這方面的一些進展:
這是我Neo4j.conf:
dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware
com.graphaware.runtime.enabled=true
com.graphaware.module.ES.2=com.graphaware.module.es.ElasticSearchModuleBootstrapper
com.graphaware.module.UIDM.uuidProperty=ID()
com.graphaware.module.ES.node=hasLabel('Decision')
com.graphaware.module.ES.relationship=(false)
com.graphaware.module.ES.uri=localhost
com.graphaware.module.ES.port=9200
com.graphaware.module.ES.index=neo4j-index
在我的應用我有一個實體:Decision
。 Decision
是一個複雜的類型有很大父層次:
Decision extends Commentable extends Votable extends Flaggable ... and so on.
現在我加入〜60個決策節點到我的Neo4j數據庫,但我無法看到所有的人都在ES。我只能在層次結構中看到每個父類都有重複的第一個。
這是什麼什麼,我現在有:
$ curl -XGET 'http://127.0.0.1:9200/neo4j-index-node/_search?pretty=true&q=*:*'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 8,
"max_score" : 1.0,
"hits" : [ {
"_index" : "neo4j-index-node",
"_type" : "Decision",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Authorable",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Subscribable",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "BaseEntity",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Votable",
100 7842 100 7842 0 0 7842 0 0:00:01 --:--:-- 0:00:01 7658kl",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Flaggable",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Likeable",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
}, {
"_index" : "neo4j-index-node",
"_type" : "Commentable",
"_id" : "null",
"_score" : 1.0,
"_source" : {
"avgVotesWeight" : 0.0,
"updateDate" : "2017-04-19T09:17:36.883Z",
"nameSlug" : "antivirus-software-for-windows",
"lowerName" : "antivirus software for windows",
"description" : "This is a non-exhaustive list of notable antivirus and Internet Security software, in the form of comparison tables, according to their platform (e.g. desktop and server, mobile, etc.)",
"totalDislikes" : 0,
"totalChildDecisions" : 59,
"totalCriteria" : 19,
"multiVotesAllowed" : false,
"totalCharacteristics" : 8,
"totalComments" : 0,
"totalFlags" : 0,
"likeSum" : 0.0,
"totalVotes" : 665,
"name" : "Antivirus software for Windows",
"totalLikes" : 0,
"createDate" : "2017-04-19T09:17:20.347Z"
}
} ]
}
}
爲什麼所有的決策的子類(如Votable
,Likeable
)也被複制嗎?正如你可以從我的配置看,我曾試圖排除一切除外:
com.graphaware.module.ES.node=hasLabel('Decision')
我的目標是在指數僅ES節點Decision
。
此外,爲什麼從〜60的唯一的單一決定是索引在那裏?我認爲Elasticsearch JSON輸出中的「_id」:「null」與此問題有關。我究竟做錯了什麼 ?