Search list with mutual count (2nd try)

As I said in my comment, trying to query for connected and disconnected nodes at the same time doesn’t seem to be a good idea. If you want only connected nodes, try the following query : START me=node:node_auto_index(UserName=”manish”) MATCH me-[:friends]-mf-[:friends]-other, me-[r?]-other WHERE other.UserName! =~ ‘(?i)dh.*’ RETURN DISTINCT ID(other), r.ApprovalStatus AS status, count(mf) AS mutual, ID(me) … Read more

APOC is only partially installing its extension in neo4j (one procedure)

There is a poorly documented difference between installing neo4j using an installer (which is most common) versus from a zip or tar file. (A) When you install neo4j using an installer, the installer configures the neo4j server to look for the plugins folder in the database folder (i.e., under the default.graphdb folder). (B) When you … Read more

What does a comma in a Cypher query do?

Since Cypher’s ASCII-art syntax can only let you specify one linear chain of connections in a row, the comma is there, at least in part, to allow you to specify things that might branch off. For example: MATCH (a)–>(b)<–(c), (b)–>(d) That represents three nodes which are all connected to b (two incoming relationships, and one … Read more

Is there a way to show cypher execution plan?

You can still find the neo4j shell, where you can run the profile command. Either by connecting to the running server by starting bin/neo4j-shell Or by switching to the old web-ui in the “(i)” Info-menu on the left side and selecting the bottommost link “webadmin” -> http://localhost:7474/webadmin Profiling information will be added to browser later … Read more

Does Karate supports Neo4j Database?

Karate supports any Java code so that way indirectly you should be able to do anything you want. Please look at this JDBC example which will get you started: dogs.feature. You will need to write a little bit of Java code (one time only) so if you don’t have that skill, please ask someone to … Read more

Return node if relationship is not present

Update 01/10/2013: Came across this in the Neo4j 2.0 reference: Try not to use optional relationships. Above all, don’t use them like this: MATCH a-[r?:LOVES]->() WHERE r IS NULL where you just make sure that they don’t exist. Instead do this like so: MATCH a WHERE NOT (a)-[:LOVES]->() Using cypher for checking if relationship doesn’t … Read more

How can I express additional information (time, probability) about a relation in RDF?

There are several options to do this. I’ll illustrate some of the more popular ones. Named Graphs / Quads In RDF, named graphs are subsets of an RDF dataset that are assigned a specific identifier (the “graph name”). In most RDF databases, this is implemented by adding a fourth element to the RDF triple, turning … Read more

tech