neo4j

neo4j, nodejs, session expire error, how to fix it?

蹲街弑〆低调 提交于 2020-01-17 12:40:07
问题 I was trying to use neo4j at backend. First I want to import csv to neo4j. (first tried to see how many lines csv file has) But having problem, the code is following var neo4j = require('neo4j-driver').v1; var driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j")); function createGraphDataBase(csvfilepath) { var session = driver.session(); return session .run( 'LOAD CSV FROM {csvfilepath} AS line RETURN count(*)', {csvfilepath} ) .then(result => { session.close();

Neo4j cache and performance

倖福魔咒の 提交于 2020-01-17 08:42:20
问题 I'm testing a query in neo4j and I see that when I clear the cache . Neo4j takes more time to load . which mean performances are dicreasing . Why is this happening I don't know now whether to clear the cache for each query ? or should I just test without clearing the cache 回答1: Neo4j browser doesn't cache any data from a query. So clearing your browser cache has no incidence on the query execution time. Perhaps the browser is creating a new connection to the database, makes some computations

How to filters data at node level in Neo4j Cypher

怎甘沉沦 提交于 2020-01-17 08:16:06
问题 Let suppose we have two match and now we want something like that (match1-match2) match (u:User)-[r:HAS_RESOURCES]-(resource:Resource) where id(u)=1484 match (resource1:Resource)-[r1:OWNED_BY_USER]-(owner:User) where resource1.isPublished=true return resource1 This cypher we made . So now we want something like this id(resource1)-id(resource) 回答1: you can filter resources that are not in a collection. Make sure to have an index on :Resource(isPublished) otherwise you have to scan across all

Graphaware Framework and UUID not starting on Neo4j GrapheneDB

南笙酒味 提交于 2020-01-17 06:46:09
问题 I am trying to get the Graphaware Framework and UUID running on a GrapheneDB instance. I have followed the instructions to zip the JAR and neo4j.properties files and uploaded using the GrapheneDB Web Interface but UUID's are not added when I create a new node. neo4j.properties file dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware com.graphaware.runtime.enabled=true #UIDM becomes the module ID: com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper #optional

Graphaware Framework and UUID not starting on Neo4j GrapheneDB

半腔热情 提交于 2020-01-17 06:45:37
问题 I am trying to get the Graphaware Framework and UUID running on a GrapheneDB instance. I have followed the instructions to zip the JAR and neo4j.properties files and uploaded using the GrapheneDB Web Interface but UUID's are not added when I create a new node. neo4j.properties file dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware com.graphaware.runtime.enabled=true #UIDM becomes the module ID: com.graphaware.module.UIDM.1=com.graphaware.module.uuid.UuidBootstrapper #optional

Neo4j 2.0 How Long can a Cypher Query Be when Passed to the Execution Engine?

非 Y 不嫁゛ 提交于 2020-01-17 06:20:13
问题 Basically, what's the limit on query size? I'm writing a query that searches all properties in the database for a string. At the end of the query, I take the results and sort them into buckets. This makes for a very long cypher query. I'm passing this query to the Execution Engine in a server plug-in. Right now I have a limited amount of properties, so the query runs fine. I'm just concerned that as I get more properties over time that the actual string size of the query will be too long for

create relationships in neo4j cypher using case statement

微笑、不失礼 提交于 2020-01-17 05:50:31
问题 I have a JSON in the next form: { "conditions": [ { "id": "123", "type": "a", entities: ["529", "454"] }, { "id": "124", "type": "b", entities: ["530", "455"] } ] } I want to create relation ship between the Condition node with node A Entities or node B entities based on type attribute which can be A/B i Assuming that these entities already exists in neo4j. I am trying something like the below cypher but that doesn't work. WITH {json} as data UNWIND data.conditions as condition MATCH (c

Neo4j REST queries logged on neo4j server

旧时模样 提交于 2020-01-17 04:22:07
问题 How can I log queries that are run by via the REST API on the neo4j server? I tried enabling the http logs on the server but the http log file in blank when I run a query using Neo4jClient. 回答1: Just enable http-logging: http://docs.neo4j.org/chunked/stable/server-configuration.html#_http_logging_configuration This was only fixed in a recent version (so please try 2.1.2) 来源: https://stackoverflow.com/questions/24143880/neo4j-rest-queries-logged-on-neo4j-server

Collecting the result of cypher query into a hash map java?

社会主义新天地 提交于 2020-01-17 03:29:31
问题 This is a followup of Finding connected nodes question. The code is firstNode = graphDb.createNode();//creating nodes firstNode.setProperty( "person", "Andy " ); Label myLabel = DynamicLabel.label("person"); firstNode.addLabel(myLabel); ... relationship = firstNode.createRelationshipTo( secondNode, RelTypes.emails );// creating relationships relationship.setProperty( "relationship", "email " );.... ExecutionEngine engine = new ExecutionEngine(graphDb); ExecutionResult result = engine.execute(

creating 200K relationships to a node is taking a lot of time in Neo4J 3.5?

霸气de小男生 提交于 2020-01-16 19:32:13
问题 I have one vertex like this Vertex1 { name:'hello', id: '2', key: '12345', col1: 'value1', col2: 'value2', ....... } Vertex2, Vertex3, ..... Vertex200K { name:'hello', id: '1', key: '12345', col1: 'value1', col2: 'value2', ....... } Cypher Query MATCH (a:Dense1) where a.id <> "1" WITH a MATCH (b:Dense1) where b.id = "1" WITH a,b WHERE a.key = b.key MERGE (a)-[:PARENT_OF]->(b) The end result should be Vertex1 should have a degree of 200K , therefore, there should be 200K relationships. However