neo4j

Can't configure node_auto_index with InProcessServer() SDN 4

谁说我不能喝 提交于 2019-12-13 05:27:28
问题 I'm using the following java configuration for my Neo4j (using SDN 4.0.0.RELEASE) based application, with unit tests: ... @Bean public Neo4jServer neo4jServer() { return new InProcessServer(); } @Bean public SessionFactory getSessionFactory() { Neo4jRequest<String> neo4jRequest = new DefaultRequest(httpClient); String json = "{" + "\"name\" : \"node_auto_index\", " + "\"config\" : {" + "\"type\" : \"fulltext\", " + "\"provider\" : \"lucene\"" + "}" + "}"; neo4jRequest.execute(neo4jServer()

Neo4j - Calculate similarity and Insert a new relationship between nodes if not exists

谁说胖子不能爱 提交于 2019-12-13 05:19:41
问题 Edited: I need to check whether the relationship exists or not. If not exists then calculate similarity between nodes, which is bit time taking. And then, i need to insert the relation ship between them. I need to do the repeat this for all the pair of nodes in the graph. Programmatic paradigm for this scenario is like: If relationship exits then calculate similarity and insert relationship else do nothing (or) return value There is also problem with this query is, it may also cause memory

Neo4J Query with multiple filter does not return the expected result

时光总嘲笑我的痴心妄想 提交于 2019-12-13 05:19:07
问题 I am using the following Neo4JClient code to query for all the shipment count that is due within a wee, one week to 21 days and greater than 21 days. var query = GraphClient.Cypher .Merge("(user:Person{InternalId:{userId}})") .WithParam("userId", userId) .With("user") .Match("(veh:Vehicle)<-[:HAS_VEHICLE_TYPE]-(load:ActiveShipment)-[:SHIPPED_BY]->(shipper:Shipper), (user)-[:WORKS_FOR_COMPANY]->(transporter:Transporter)") .Where("((load.RestrictedBidding = false) OR (user)-[:WORKS_FOR_COMPANY]

No index provider 'spatial' found

落爺英雄遲暮 提交于 2019-12-13 05:15:57
问题 I tried to create a class called Neo4jPoint with an attribute @Indexed(indexType=IndexType.POINT, indexName="geolocation" String wkt; When I run my junit test case, it encountered the following: java.lang.IllegalArgumentException: No index provider 'spatial' found. Maybe the intended provider (or one more of its dependencies) aren't on the classpath or it failed to load. at org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:88) at org.neo4j.kernel.IndexManagerImpl

Neo4j PHP Acquire wirte lock

我怕爱的太早我们不能终老 提交于 2019-12-13 05:15:13
问题 Sinking in big trouble, Well can anyone tell me , how can i acquire write lock through cypher. Note : I will use REST APIs , So my cypher would in php. EDITED : Scenario: I am using Neo4j REST server and PHP to access it. Now i have created a node say 'counter-node' which generates new user id. Logic is just add 1 to previous value. Now If two users are coming simultaneously then first user read 'counter-node' value BUT before it can update it to 1 , second user read it . Thus value in

Neo4jClient Create Unique results in multiple duplicate nodes

╄→гoц情女王★ 提交于 2019-12-13 05:11:12
问题 I was wondering if some one can help me understand how Create Unique actually works in Neo4J. I am trying to register multiple addresses to a shipper node, where I expect the City, State and country to be same across the addresses so that they all point to the same node. However the issue is that the Create Unique is resulting in multiple instance of same node in the database. Here is the function I have to register an address with the shipper which I call multiple times with same Shipper

How can I access neo4j running on ( any http or localhost) from android

送分小仙女□ 提交于 2019-12-13 05:09:15
问题 I am successfully implemented neo4j on both mac and java application but I cannot access the same from and android and the it crashes at dbpath.But it keeps crashing.How can I get it to work? INstead of graphDb = new EmbeddedGraphDatabase(DB_PATH); it is RestAPI graphDb = new RestAPIFacade("http://localhost:7474/db/data"); also tried GraphDatabaseService graphDb=new RestGraphDatabase(“http://localhost:7474/db/data”); Entire Code: import java.io.File; import java.io.IOException; import org

Neo4j/Cypher: Setting a map and property yields “expected valid query body”

ε祈祈猫儿з 提交于 2019-12-13 05:07:48
问题 The following query fails: MATCH n:User WHERE n.email = "test" SET n = {data}, n.created = timestamp() RETURN n Is this expected? Is it a bug? Is there a workaround? Do I have to compute the timestamp and send it along with {data} ? 回答1: A slight modification of your statement using 2 SET clauses works: MATCH n:User WHERE n.email = "test" SET n = {data} SET n.created = timestamp() RETURN n 来源: https://stackoverflow.com/questions/17686010/neo4j-cypher-setting-a-map-and-property-yields-expected

Neo4j Java 7 Terminal Issue

北城余情 提交于 2019-12-13 04:55:31
问题 I'm having issues starting my neo4j instance (2.0.0 M03). I have java 7 installed as indicated in the code block below but when trying to start neo4j it apparently does not recognize this, gives and error and does not start. The terminal output is below. Any ideas on how to fix this or what exactly is going wrong? Thanks a lot. Tim-Bornys-MacBook-Pro:neo4j community 2.0.0 M03 BornyTM$ java -version java version "1.7.0_25" Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM)

How to verify if a graph obeys a power law?

[亡魂溺海] 提交于 2019-12-13 04:46:55
问题 I am using the GraphStream to generate syntethic graphs. What is the formula to verify if the graph obeys the power law? (I have only the number of nodes and edges) Thanks. 回答1: So we have a graph with an edge collection named relations . We can gather the required data using a full table scan on this edge collection using AQL in ArangoDB. We need to unify _from and _to so we can count them. We use the collect statement to evaluate the diameter for each vertex: FOR oneEdge IN relations FOR