neo4jclient

Return All Nodes in Shortest Path as Object List

假如想象 提交于 2021-02-07 07:17:34
问题 I have the following Cypher Query which works fine in the Neo4j 2.0.0. MATCH (ab:Point { Latitude: 24.96325, Longitude: 67.11343 }),(cd:Point { Latitude: 24.95873, Longitude: 67.10335 }), p = shortestPath((ab)-[*..150]-(cd)) RETURN p The following Query in Neo4jClient gives the error: Function Evaluation Timed out. var pathsQuery = client.Cypher .Match("(ab:Point { Latitude: 24.96325, Longitude: 67.11343 }),(cd:Point { Latitude: 24.95873, Longitude: 67.10335 }), p = shortestPath((ab)-[*..150]

Neo4j Client UNWIND with “DateTime?”

会有一股神秘感。 提交于 2021-01-27 07:11:43
问题 I'm currently trying to unwind a list of TravelEdges that has a "DateTime?" but I keep receiving the following error: {"CypherTypeException: Type mismatch: expected a map but was String(\"2018-05-21T08:38:00\")"} I'm currently using the latest version of neo4j (3.4.8) and was wondering if someone could assist? Also, is there a more efficient way of adding the edges without having two matches? The Id's are unique. List<TravelEdge> travelpoints = new List<TravelEdge>(); //Add stuff to list

Neo4j Client UNWIND with “DateTime?”

﹥>﹥吖頭↗ 提交于 2021-01-27 07:10:00
问题 I'm currently trying to unwind a list of TravelEdges that has a "DateTime?" but I keep receiving the following error: {"CypherTypeException: Type mismatch: expected a map but was String(\"2018-05-21T08:38:00\")"} I'm currently using the latest version of neo4j (3.4.8) and was wondering if someone could assist? Also, is there a more efficient way of adding the edges without having two matches? The Id's are unique. List<TravelEdge> travelpoints = new List<TravelEdge>(); //Add stuff to list

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

how to use unwind in neo4jclient for updating data?

偶尔善良 提交于 2020-01-06 07:44:20
问题 I want to update some of my records in the neo4j DB. In order that I wrote this query in Neo4jClient in C#: _client.Cypher .Unwind(skills, "updatedSkill") .Match("(s : Skill {Name: updatedSkill.Name}") .Set("s = updatedSkill"); .ExecuteWithoutResults(); Where skills is a simple list of Skill objects: public class Skill { public string Name { get; set; } public string Phrase { get; set; } } But this code throws exception when I call it. Its translated Cypher query is: UNWIND [{ "Name": "name1"

Build a dynamic query using neo4j client

自闭症网瘾萝莉.ら 提交于 2020-01-06 02:58:06
问题 I read many questions on this topic and created the following almost dynamic query: var resQuery = WebApiConfig.GraphClient.Cypher .Match("(movie:Movie {title:{title}})") .WithParam("title", title) .Return(() => new { movie = Return.As<string>("movie.title") }).Results; Unfortunately this isn't dynamic since I'm declaring the movie property in the Return anonymous type. In all the examples I found the only option is to return the nodes as an object matches the node properties, like: movie =

Neo4jClient/Cypher query returns object but without setting properties

痴心易碎 提交于 2020-01-05 19:14:19
问题 I just can't get an object out of Neo4j through Neo4jClient and Cypher. var client = new GraphClient(new Uri("http://mymachine:7474/db/data")); client.Connect(); var myList = client.RootNode.StartCypher("root") .Match("root-[:RELATED_TO]->(user)") .Return<User>("user").Results; I get a User object in myList[0] alright but its properties are empty. I get the same (object with empty properties) through client.ExecuteGetCypherResults<User>( new CypherQuery("start n=node(1) return n;",null,

Convert cypher query to c#

…衆ロ難τιáo~ 提交于 2020-01-04 09:05:33
问题 I have two tables: User Name Surname Phone number type_of_number var myList = ((IRawGraphClient) client).ExecuteGetCypherResults<**i_need_class_to_save_it**>( new CypherQuery("match (a:User)-[r]->(b:Phone) return a,collect(b)", null, CypherResultMode.Set)) .Select(un => un.Data); How create correct collection to save data? 回答1: It sounds like you haven't read https://github.com/Readify/Neo4jClient/wiki/cypher or https://github.com/Readify/Neo4jClient/wiki/cypher-examples. You really should

How do i retrieve a relationship in Neo4j graph database

吃可爱长大的小学妹 提交于 2020-01-03 19:37:28
问题 Please bear with me I'm new to this: I'm currently using the .Net neo4jClient. Currently I have a Share node and a Customer node. I'm creating a relationship CustomerOwnsShare between them and persisting it. Here's my Relationship class public class CustomerOwnsShare : Relationship, IRelationshipAllowingSourceNode<Customer>, IRelationshipAllowingTargetNode<Share> { public CustomerOwnsShare(NodeReference targetNode) : base(targetNode) { } public int Quantity { get; set; } public float

Neo4j Client, how to retrieve node by id?

痞子三分冷 提交于 2020-01-03 03:35:12
问题 I am trying to figure out the way to retrieve node by id. MATCH (n) WHERE ID(n) = {id} RETURN n , is the Cypher I used with REST interface. Now using fluent syntax of Neo4j Client for .net I cannot find the function name in Neo4J.Cypher namespace, like for instance ALL. Anybody knows how to re-write that query in fluent syntax? client.Cypher .Match("(node:Employee)") .Where(node=>**?**(node)== 3) .Return(node) 回答1: There is no ID function name in the codebase, so you have to go old skool I'm