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

How to realize a multi-client capability in Neo4j?

Initial situation I have several independent and disconnected graphs, each of them have a hierarchical like structure with a local root element. Each of these graphs consists of approximately 8 million nodes and 40 million relationships. I have…
ThirstForKnowledge
  • 1,245
  • 1
  • 10
  • 27
0
votes
1 answer

Merge nodes with apoc and average property values

When merging nodes with: apoc.refactor.mergeNodes(nodes, {properties:'combine', mergeRels:true}) The nodes' relationships will be merged as well, and their properties will be concatenated in a…
seven11
  • 895
  • 1
  • 7
  • 14
0
votes
1 answer

Return distinct paths

I want to get unique patterns from my graph, but if nodes are ordered differently in same paths, neo4j considers these paths to be different. This is the pattern I want to…
seven11
  • 895
  • 1
  • 7
  • 14
0
votes
2 answers

Cypher query to find all relationship among multiple nodes

I have a complex graph as shown in image below : Here every relationship has a type value. I need to write a cypher query to find all relationships (with their type values) among given set of nodes (two or more). The nodes can be entered in any…
Fayaz
  • 314
  • 6
  • 20
0
votes
1 answer

Neo4j Lucene query syntax for multi-word autosuggest fuzzy fulltext search

I'm trying to implement Lucene query for multi-word autosuggest full-text search. For example, I'd like to be able to search for Arnold Schwarzenegger in database. Right now I can do the fuzzy search by one…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
0
votes
2 answers

When using apoc.load.html, Is it possible to return the full HTML rather than only text?

Lets say I want to scrape the Neo4j RefCard found at: https://neo4j.com/docs/cypher-refcard/current/ And I would like to fetch a 'code' example along with its styling. Here's my target. Notice that it has CSS treatment (font, color...): ...so in…
mojo2go
  • 107
  • 10
0
votes
0 answers

Neo4j APOC trigger, manual index - lowercase property values

I have created the following Neo4j APOC trigger which adds node properties into the manual index: CALL apoc.trigger.add('CREATE_NODES_TRIGGER', "UNWIND {createdNodes} AS n WITH n WHERE labels(n)[1] IN ['Title','Name','Character'] CALL…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
0
votes
1 answer

Is there an equivalent function to the SQL PIVOT in Cypher or APOC?

I would like to ask if it is possible to PIVOT (SQL) data (suppose the same as 'transpose' in excel) data? Thank you
0
votes
1 answer

neo4j apoc.load.xml get nested element value

I'm trying to import an xml-file with apoc.load.xml. Especially I'm trying to get the text in the label-element. Here is my example query: CALL apoc.load.xml('https://seafile.rlp.net/f/cf1f73f3cbdf413eb14d/?dl=1','',{}, true) yield value as…
Andreas Kuczera
  • 353
  • 1
  • 2
  • 14
0
votes
1 answer

Neo4j/Cypher: Extracting the last item of a StringArray (This what neo4j called it)

Lets say I have a node with a property, Event, that is assigned a StringArray. I am trying to extract '6013' and '6005' that were assigned from a collection when the node was created ( see below for creation query code) and assign them to as another…
N6DYN
  • 325
  • 1
  • 3
  • 17
0
votes
1 answer

Neo4j/Cypher: Passing properties through WITH

I am posting a new question because this is a separate but related issue to this question: Neo4j: Link Different Nodes to the one node The below query is returning the correct number of nodes. MATCH (act)--(obj) WHERE obj.filename IN ["6013",…
N6DYN
  • 325
  • 1
  • 3
  • 17
0
votes
1 answer

Neo4j: Link Different Nodes to the one node

Let's say you have the following 4 nodes: Set 1: (act: "Event Log", timestamp: 3461000) (act: "Uptime Report", timestamp: 3461000) Set 2: (act: "Event Log", timestamp: 149100) (act: "Uptime Report", timestamp: 149100) I am trying to figure out how…
N6DYN
  • 325
  • 1
  • 3
  • 17
0
votes
1 answer

Java Neo4j - There is no procedure with the name `apoc.refactor.mergeNodes`

I'm using a Neo4j Java application with the APOC procedures: xml import and mergeNodes. The xml import is fine, but I can't tell the same for mergeNodes function. I know how to register APOC procedure, so here the code: private static void…
Wall
  • 293
  • 3
  • 13
0
votes
2 answers

Relationship Direction can't be retained after using call apoc.refactor.cloneNodesWithRelationships

I'm using neo4j community edition 3.0.6 and apoc 3.0.8.6. I'm having this issues where i tried to copy a node that already have multiple relationship. Then when I use call apoc.refactor.cloneNodesWithRelationships([node1,node2,…​]) the nodes and its…
0
votes
2 answers

neo4j get values that match a criteria

I'm working on a neo4j query trying to return a node that has a total ownership of 1 (representing 100%). So I'm summing the ownership of a node. My query to get the sum of ownership works correctly and is as follows: match…
Michael Porter
  • 229
  • 3
  • 12