neo4j

Returning an entire hierarchy (tree) using neo4j/cypher

倾然丶 夕夏残阳落幕 提交于 2019-12-07 11:09:07
问题 I have a graph which has a hierarchy of categories in it (similar to product categories on a shopping site, e.g., Clothing --> Mens --> Shirts --> Short Sleeve --> ...). I have a few use cases where I need to retrieve the entire hierarchy as a tree (nested ruby and/or javascript objects in this case). The only solution I've been able to come up with is to use NODES() to retrieve each unique path and then transform it into nested objects in the client. The performance of this is obviously a

Neo4j string or text data types

青春壹個敷衍的年華 提交于 2019-12-07 09:16:28
问题 Trying to work with strings. Can't find any specs about this data types. What is the max length os String in Neo4j? If the limit is 256, is there a larger type, like Text? 回答1: In Neo4j there's no distinction between a string and something like TEXT . Property values in Neo4j can be java primitive types (int, long, double, boolean, ...), Strings and arrays of those. Strings in java can have an arbitrary length, same applies for Neo4j. Be aware that long strings get handled internally

Cannot Merge Node error: Neo4j

拜拜、爱过 提交于 2019-12-07 08:46:06
问题 I have 2 CSV files which I want to convert into a Neo4j database. They look like this: first file: name,enzyme Aminomonas paucivorans,M1.Apa12260I Aminomonas paucivorans,M2.Apa12260I Bacillus cellulosilyticus,M1.BceNI Bacillus cellulosilyticus,M2.BceNI second file name,motif Aminomonas paucivorans,GGAGNNNNNGGC Aminomonas paucivorans,GGAGNNNNNGGC Bacillus cellulosilyticus,CCCNNNNNCTC As you can see the common factor is the Name of the organism and the. Each Organism will have a few Enzymes and

Neo4j on Microsoft Azure Deployment template validation failed?

无人久伴 提交于 2019-12-07 08:44:34
问题 EDITED My azure subscription is Visual Studio Enterprise: BizSpark When trying to configure neo4j on Microsoft Azure by following the guide explained on How to Deploy Neo4j on Microsoft Azure Step-by-Step On Step 2: Neo4j Settings... there is no SSL certificate options, VM options as explained on the guide after clicking OK ..... the following error showed up, stating InvalidTemplate Deployment template validation failed: 'The value for the template parameter 'SubnetName' at line '56' and

neo4j java driver problems when using ssl through awselb

帅比萌擦擦* 提交于 2019-12-07 08:18:49
问题 I' am using neo4j community version 3.1.1 and enterprise edition version 3.0.1 with ssl configured through awselb . To connection i use neo4j java driver version 1.0.0 After i configure ssl and connection through awselb i have problem with opened files they are growing so fast and their amount not reduced . Code in app to use ssl GraphDatabase.driver(host, authToken, Config.build().withEncryptionLevel(Config.EncryptionLevel.REQUIRED).toConfig()); I try upgrade neo4j driver to version 1.1.1

How do I use Neo4j-embedded for Python (threads) in Flask microframework?

夙愿已清 提交于 2019-12-07 07:49:48
问题 I'm following the Flask Tutorial (Flaskr) in order to experiment with using Neo4j-embedded for Python. This is in a virtualenv. Here is my 'main' app code: import os import jpype from neo4j import GraphDatabase from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash app = Flask(__name__) app.config.from_pyfile(os.environ['APP_SETTINGS']) def connectDB(): return GraphDatabase(app.config['DATABASE']) def initDB(): db = connectDB() with db.transaction:

Change data storing location in Neo4j in Ubuntu

假如想象 提交于 2019-12-07 07:42:52
问题 I have successfully installed neo4j with the port number 7474 and it works fine. My problem is the data is stored into /var/lib/neo4j . This location in this directory is going to be full very soon. I want to change the data store location. How is this possible? I have tried to edit the file /etc/neo4j/neo4j-server.properties in the line org.neo4j.server.database.location=data/graph.db but it doesn't work. 回答1: Try to use an absolute path for org.neo4j.server.database.location and make sure

Can I send neo4j browser a cypher query via get/post?

≡放荡痞女 提交于 2019-12-07 07:22:12
问题 How can I send (programatically) a cypher query to neo4j browser (via get/post) in order to display the resulted graph? e.g., something like: http://localhost:7474/browser/query='match n return n' 回答1: Yes, you can. Example request POST http://localhost:7474/db/data/cypher Accept: application/json; charset=UTF-8 Content-Type: application/json { "query" : "MATCH (x {name: 'I'})-[r]->(n) RETURN type(r), n.name, n.age", "params" : { } } Example response 200: OK Content-Type: application/json;

How to use a CSV field to define the node label in a LOAD statement

喜你入骨 提交于 2019-12-07 06:44:57
问题 This example is taken from https://neo4j.com/developer/guide-importing-data-and-etl/#_importing_the_data_using_cypher" LOAD CSV WITH HEADERS FROM "file:customers.csv" AS row CREATE (:Customer {companyName: row.CompanyName, customerID: row.CustomerID, fax: row.Fax, phone: row.Phone}); What I want to do is use a field in the CSV file to define the label in the node. For example: LOAD CSV WITH HEADERS FROM "FILE:///Neo4j_AttributeProvenance.csv" AS CSVLine CREATE (q:CSVLine.NodeType { NodeID

Neo4django Relationship properties

霸气de小男生 提交于 2019-12-07 06:30:33
问题 So I've trying to model a small user-group relationship in Neo4j with Django. I am currently employing the Neo4django python package seen here. Now, I have nodes representing my users, and nodes representing my groups, and relationships that link them indicating membership. What I'm hoping to also do in the near future is add properties to this relationship such as date_joined. I looked around but there isn't too much documentation on how to achieve this. I'm sure there is a way of doing it,