Questions tagged [neo4j-apoc]

APOC is short for "Awesome Procedures on Cypher." Introduced in Neo4j release 3.0, APOCs are callable procedures which extend the Cypher query language.Questions with the neo4j-apoc tag should be for "small, generic helper functions for common tasks" that are not available in the Cypher query language.

APOC procedures are "User Defined Procedures." They are similar to stored procedures in some relational databases. APOCs can be written in any language that runs on the JVM. Questions tagged with neo4j-apoc should have an accompanying tag for the specific language being used.

Built in procedures are included in Neo4j releases. Before posting a question on StackOverflow, please consult the Neo4j documentation and ask if your task is possible in the public chat channels.

685 questions
0
votes
1 answer

apoc 3.3.0.1 in neo4j 3.3.1 - Token create operations are not allowed for user 'neo4j' with FULL restricted to READ

Having a problem with apoc 3.3.0.1 on neo4j 3.3.1 on ubuntu. I want to use apoc.when cause to create elements under certain conditions. on: CALL apoc.when(true, "CREATE (a:Test) return a", "", { }) yield value return null i get the following…
TheRueger
  • 2,508
  • 1
  • 16
  • 12
0
votes
0 answers

neo4j : extraction of random graphs WITH CONSTRAINT

For the extraction of a random graph, I use: // assume already matched to start node n MATCH r = (n)-[:I]-() WITH apoc.coll.randomItems(collect(r), 10) as r1 UNWIND r1 as r WITH r1, last(nodes(r)) as n MATCH r = (n)-[:I]-() WITH r1,…
0
votes
1 answer

Conditional query in neo4j using apoc

I am trying to execute conditional query in cypher Below is my sample query, but it does not create new conversation node even if condition is true. WITH ["Ram", "Shyam", "Hari"] as names WITH names, size(names) AS requiredCount MATCH (u:User) WHERE…
Yalamber
  • 7,360
  • 15
  • 63
  • 89
0
votes
1 answer

Neo4j Procedure with static variables in a cluster

Let's say I have a Neo4j Database with a custom Procedure, I've written. The procedure uses a static variable as some kind of some short term memory, like the apoc.search procedure does for example. I now want to cluster my Neo4j which would mean I…
Urr4
  • 611
  • 9
  • 26
0
votes
0 answers

Query takes more time On WHERE

MATCH (pr:PR)-[:CLOSED_ON]-(cls) WHERE NOT(cls.closedDate = '' ) RETURN pr Execution time : 588 ms MATCH (pr:PR)-[:CLOSED_ON]-(cls) WHERE NOT(cls.closedDate = '' ) AND apoc.date.parse(cls.closedDate,'s', 'MM/dd/yyyy') >=…
Swapnil
  • 1,424
  • 2
  • 19
  • 30
0
votes
0 answers

APOC: unavailable namespaces

Just added apoc to a neo4j installation. As a result, got access to the namespaces apoc.coll and apoc.load only. Can't even do basic stuff like RETURN apoc.version(). The jar in the plugins directory contains much more than that, but in the…
vanhemt
  • 165
  • 10
0
votes
1 answer

Neo4J with APOC and MongoDB Driver, limiting returned records from Mongo

Limiting the number of returned records in MongoDB is as simple as db.collection.find().limit(n). However I'd like to issue the equivalent query from Neo4J. Given that a find query is issued from Neo4J as follows... apoc.mongodb.find(host, db,…
Alex
  • 183
  • 1
  • 10
0
votes
1 answer

Not getting isolated node in neo4j

I took help from this answer it works fine but not for isolated nodes means single node with no relations (child nodes). What i am getting in this case not even that one node. Kindly help me i am beginner to neo4j, it would be great favour answer…
Awais Khan
  • 175
  • 1
  • 15
0
votes
0 answers

'relationshipFilter' in apoc.path.expandConfig() doesn't seem to work

I have a simple Neo4J DB, with 6 nodes and the following relationships: (n0:A {my_id:1})-[:A]->(n1) (n1)-[:B]->(n2) (n2)-[:C]->(n3) (n3)-[:B]->(n4) (n4)-[:A]->(n5:A) Running the following apoc query returns nothing: match(n {my_id:1}) with (n) …
Omeriko
  • 1,173
  • 11
  • 22
0
votes
1 answer

How to use Neo4j APOC method " apoc.export.csv.query(query,file,config)" in Java program

How can I use this cypher query using APOC in Java program? CALL apoc.export.csv.query("match (m:Movie) where m.name='Matrix' RETURN m.name","results.csv",{}) If any one can refer/suggest to sample JAVA code, it would be great. A few lines or one…
Faaiz
  • 635
  • 8
  • 18
0
votes
1 answer

Change date format in order to find difference in Time in Neo4j 3.2.5

I am working on a code in Neo4j and want to find out the difference between two time columns. The date time is in format 20130508 19:14:56.913. I also tried using APOC function, but I am getting the error that it is Unknown function. Could anyone…
Shefali
  • 19
  • 3
0
votes
2 answers

Handle Neo4j Injection for dynamic labels and relationships

I have been usingWithParams with neo4j client for c# but withParams don't work for label or relationship types for example. The alternative I thought of the moment was to concatenate my string that I want to form based on some label as parameter…
Kevin Cohen
  • 1,211
  • 2
  • 15
  • 22
0
votes
1 answer

Not able to displaying properties in gephi from Neo4j

I'm running the following query using apoc.gephi.add to display data from Neo4j in Gephi. MATCH path = (pr1:Person)-[*0..2]->(pr2:Person) WHERE pr1.id={id1} AND pr2.id={id2} AND pr1.id<>pr2.id CALL apoc.gephi.add ('http://localhost:8091',…
skibee
  • 1,279
  • 1
  • 17
  • 37
0
votes
1 answer

Lack of certain Neo4j scalar functions

Using Neo4j 3.2.0 community edition. Properties types in Neo4j ought to match the Java primitives. Why are there only scalar functions for integer (i.e. toInteger) and float? When importing (LOAD CSV) it would be useful to do string conversion…
Matthew Campbell
  • 1,864
  • 3
  • 24
  • 51
0
votes
1 answer

Correct method to setting up Neo4j APOC in embedded mode

I'm using embedded Neo4j, loading the library jars onto IntelliJ. I want to try out the new features of APOC in Neo4j to run some graph algorithms. I have the APOC jar downloaded and added to plugins folder as mentioned in the manual. What is the…
kami
  • 361
  • 3
  • 15