neo4j

Unknown persistent entity Error" after upgrade to 3.0.1.Release

别来无恙 提交于 2020-01-25 00:16:09
问题 Recently upgraded to Spring Neo4j 3.0.1.Release. I am now getting an Exception "MappingException: Unknown persistent entity". Not sure what could be causing this as I have not made any changes to the application. I have created a small test project to recreate the error message. You can download it from here - http://www.filebin.ca/1S2rAXPJE199/Store.zip Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountService':

Short incremental uinque id for neo4j

人走茶凉 提交于 2020-01-24 23:09:53
问题 I use django with neo4j as database. I need to use short url based on node ids in my rest api. In neo4j there is an id used in database that didn't recommended to use in app, and there is approach to use uuid that is too long for my short urls. So I add my uid generator: def uid_generator(): last_id = db.cypher_query("MATCH (n) RETURN count(*) AS lastId")[0][0][0] if last_id is None: last_id = 0 last_id = str(last_id) hash = sha256() hash.update(str(time.time()).encode()) return hash

neo4j 2.1.1 How to setup logging to analyze “Unknown Error”

隐身守侯 提交于 2020-01-24 22:41:07
问题 I am trying to load lot of data exported from my SQL Server as csv file in to neo4j using the following query: USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:e:/temp/sql_backup/events.csv" AS csvLine MERGE (dtStart:Date { Name: REPLACE (SUBSTRING(csvLine.VT_Start,0,10),"-","")}) MERGE (dtEnd:Date { Name: REPLACE (SUBSTRING(csvLine.VT_End,0,10),"-","")}) MERGE (ev:Event { EventId : csvLine.EventID}) ON CREATE SET ev = { EventId : csvLine.EventID, TagId : csvLine.TagID, EventTypeId

Map arbitrary relations via Neo4j OGM

眉间皱痕 提交于 2020-01-24 16:27:05
问题 Neo4j OGM supports arbitrary node properties being mapped to entity classes via @Convert and CompositeAttributeConverter but what about the relation part? How would I map arbitrary relations in a @NodeEntity ? The actual properties and relations being used in my data model are configurable, i.e. they are not known at compile time. Example: Configuration specifies nodes of label A and B and a relation from A to B named REL_1. Now when I am querying nodes of label A then I would like to

cypher 2.0 : using label based index to search a set of nodes

喜夏-厌秋 提交于 2020-01-24 13:09:08
问题 I have users and groups they belong to. I have an index n:Group(name) I want to search for all users belong to a set of groups : ["gr1","gr2","gr3"] which other groups they belong to. so I have the following query: Query : MATCH (gr:Group) <--(us:User)--(gr2:Group) WHERE gr.name in ["gr1","gr2"] return distinct gr2 The thing here, is that I think that cypher don't use the index because the query is to slow. I have 2k nodes, 50k relationships. The following query takes between 200 to 700 ms

neo4j db injection protection

徘徊边缘 提交于 2020-01-24 11:17:28
问题 i was wondering just like in conventional RDMS there is SQL injection so in PHP we use PDO for injection prevention but what do we use to prevent injection in Neo4j. I'm using neo4j RST api via jquery and via neo4jphp module.. So any suggestion guys. Thanks In Advance.. 回答1: One of the values of using web services is decoupling the client from the implementation of the service. In your case, this means that REST abstracts away the details of the Cypher queries Neo4jPHP makes on your behalf.

Neo4J installation - StartService Failure

丶灬走出姿态 提交于 2020-01-24 05:29:25
问题 I'm trying to install Neo4j(1.8) but i faced a problem when starting the service. after extracting the zip file I went directly to the bin folder and executed the batch file: Neo4J.bat install [SC] CreateService SUCCESS [SC] StartService Failed 1053: The service did not respond to the start or control request in a timely fashion. I was so graphDB enthusiastic so I went to the shell and created new db hundreds of nodes and relationships and I spent nearly a week working on that shell,

Create REST API with Neo4J and Django

倖福魔咒の 提交于 2020-01-24 03:36:21
问题 I am trying to create a REST API with Neo4j and Django in the backend. The problem is that even when I have Django models using Neo4Django , I can't use frameworks like Tastypie or Piston that normally serialize models into JSON (or XML). Sorry if my question is confusing or not clear, I am newbie to webservices. Thanks for you help EDIT: So I started with Tastypie and followed the tutorial on this page http://django-tastypie.readthedocs.org/en/latest/tutorial.html . I am looking for

Neo4J ClientError.Statement.SyntaxError

混江龙づ霸主 提交于 2020-01-23 12:59:09
问题 I am getting Neo.ClientError.Statement.SyntaxError while loading data from CSV file. Neo.ClientError.Statement.SyntaxError: Invalid input 'h': expected 'i/I' (line 5, column 3 (offset: 189)) "Merge (Zip_Code:Zip_Code {code: row.zip_cd,type:'location'})" Here is my Query: Using Periodic Commit LOAD CSV WITH HEADERS FROM "file:///DOL_data_whd_whisard_reduced.csv" AS row Merge (State_Code:State_Code {code: row.st_cd}) where not row.st_cd is null Merge (Zip_Code:Zip_Code {code: row.zip_cd,type:

Neo4j cypher to count and display all the relationship between two given nodes

筅森魡賤 提交于 2020-01-23 07:57:43
问题 Here I am using neo4j rest api, in first step I want to collect information like how many relationships are there between two given nodes. Sample : MATCH (n:Node {id: {parameter1}})-[r:someType]-(m:Node {id: {parameter2}}) RETURN COUNT(r) Then I would like to collect all the values assigned to the edges so I can calculate further calculations. I need all the different types of relationships and their properties between two given nodes. If it is possible I would like to do it in single cypher.