neo4j

The cypher PROFILE keyword asks for a transaction even if there is already one

落花浮王杯 提交于 2019-12-12 02:35:13
问题 I am trying to profile the following query on the neo4j server console (community edition, version 1.9.2): PROFILE START ungrouped=node(1) CREATE (grouped{__type__:'my.package.Grouped'})<-[:HAS_NEXT]-(ungrouped) MATCH (ungrouped)-[:LEAF]->(leaf) WITH leaf.`custom-GROUP` as groupValue, grouped, leaf CREATE UNIQUE (grouped)-[:GROUP]->({__type__:'my.package.Group',groupKey:'GROUP',groupValue:groupValue,groupOrigin:ID(ungrouped)})-[:LEAF]->(leaf) RETURN DISTINCT grouped; When I run the above

@Index annotation in SDN4

我怕爱的太早我们不能终老 提交于 2019-12-12 02:28:05
问题 Why there is an @Index annotation in SDN4 if it does not manage Neo4j indexes anymore? In SDN3 it was used to populate indexes in the database, but now, taking into account the documentation, it is not. 回答1: It shouldn't be there any more- it isn't used and will be removed. 来源: https://stackoverflow.com/questions/33637661/index-annotation-in-sdn4

Neo4j CSV Import Execution Failure

烈酒焚心 提交于 2019-12-12 02:27:17
问题 I'm trying to import a CSV file into Neo4j (Community Edition V 2.3.3). The Error is Neo.DatabaseError.Statement.ExecutionFailure And it shows like this: At O:\Sample1.csv:132851 - there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'MQP Coverage EPG"' 回答1: Your input file has a string with an un-escaped quote in it. Find and fix that and you'll be good to go. 回答2:

Index existing relationships in neo4j

自闭症网瘾萝莉.ら 提交于 2019-12-12 02:27:00
问题 Is it possible to add index on existing relationships. More specifically I have a relationship called Relatadness with one property called score(score is double) and I want to index it (with java or through the web client). How can do that? thanks in advance 回答1: Since you already have the relationships, you'll have to iterate through all of them. This code example will create an index called RelatadnessIndex , and store the relationship in the index under a key of score :

Batch loading neo4j

こ雲淡風輕ζ 提交于 2019-12-12 02:26:23
问题 I am batch loading a neo4j graph using py2neo using this script: batch = neo4j.WriteBatch(graph) counter = 0 for each in ans: n1 = graph.merge_one("Page", "url", each[0]) # batch.create(n1) counter +=1 for linkvalue in each[6]: try: text,link = linkvalue.split('!__!') n2 = graph.merge_one("Page", "url", link) # batch.create(n2) counter+=1 rel = Relationship(n1,'LINKS',n2, anchor_text=text) batch.create(rel) except (KeyboardInterrupt, SystemExit): print 'fail' raise if counter > 900: counter =

Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById is invoced repeatedly

流过昼夜 提交于 2019-12-12 02:23:14
问题 I'm using Neo4J-2.0.1 and SDN - 3.0.0.RELEASE. I have a NodeEntity as follow: @NodeEntity public class Group { @GraphId Long id; @Indexed(unique = true, indexType = IndexType.SIMPLE) public String name; public String property1; public String property2; public Group() { } public Group(String str) { name = str; } } I have a groups repository : public interface GroupsRepository extends GraphRepository<Group> { Group getGroupByName(String name); } After the getGroupByName(...) method is invoked,

neo4j: user defined procedure exception “Write operations are not allowed for `READ` transactions”

空扰寡人 提交于 2019-12-12 02:17:58
问题 I have implemented a user defined procedure using the example template. The procedure is annotated using "@Procedure(value = "foo.bar", mode = Mode.WRITE)", nevertheless, when I try to execute an operation on a Node instance that modifies the graph, it fails with "Write operations are not allowed for READ transactions". The node instance was obtained via db.findNode (...), and the write-operation that I am attempting to execute is nodeinstance.createRelationshipTo (...) Interestingly, the

GraphAware UUID not generating

那年仲夏 提交于 2019-12-12 02:17:44
问题 I know this question has been asked here: GraphAware Neo4j UUID not working. Nobody has answered it and I cant comment to ask that guy because I dont have enough reputation. I have all both the server framework and the uuid jar files in plugins folder and this is my config: com.graphaware.runtime.enabled=true com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper com.graphaware.module.UIDM.uuidProperty=uuid For some reason when I create a node. I'm not getting anything. This

How can I execute a cypher query (from java) to neo4j's browser?

主宰稳场 提交于 2019-12-12 02:15:56
问题 I really need your help because I spend 2 days without finding a solution for this problem. Indeed, I've created an application in java which enables me to enter a cypher query and then execute it. But The result, if you notice, is a table, thing I don't like. I'd like to display the result of the query as a graph . The first thing I did is to to execute a query from neo4j browser, it works very well. However, I'm developping in Java, and I want to execute a query in Java and (somehow) take

Starting Neo4j Server failed: Component was successfully initialized, but server failed to start

烂漫一生 提交于 2019-12-12 02:07:17
问题 I was given a graph db I must open with Neo4j. Installed community version Neo4j-2.2.0-M02 on Win7 Ultimate laptop successfully. When I tried to start the server, after pointing to the graph db, I get the following error: Starting Neo4j Server failed: Component org.neo4j.server.database.LifecycleManagingDatabase@325ce05c was successfully initialized, but failed to start. Please see attached cause exception. Logged in as windows local admin. Windows FWall is off. There's no antivirus SW