[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

Procedures & Functions

APOC will be split into APOC Core and APOC Extended in version 5. To view the new documentation for APOC Core, go to the APOC Core page.

apoc

Qualified Name Type Release

apoc.case([condition, query, condition, query, …​], elseQuery:'', params:{}) yield value - given a list of conditional / read-only query pairs, executes the query associated with the first conditional evaluating to true (or the else query if none are true) with the given parameters

Procedure

APOC Core

Provides descriptions of available procedures. To narrow the results, supply a search string. To also search in the description text, append + to the end of the search string.

Procedure

APOC Core

apoc.when(condition, ifQuery, elseQuery:'', params:{}) yield value - based on the conditional, executes read-only ifQuery or elseQuery with the given parameters

Procedure

APOC Core

RETURN apoc.version() | return the current APOC installed version

Function

APOC Core

apoc.agg

Qualified Name Type Release

apoc.agg.first(value) - returns first value

Function

APOC Core

apoc.agg.graph(path) - returns map of graph {nodes, relationships} of all distinct nodes and relationships

Function

APOC Core

apoc.agg.last(value) - returns last value

Function

APOC Core

apoc.agg.maxItems(item, value, groupLimit: -1) - returns a map {items:[], value:n} where value is the maximum value present, and items are all items with the same value. The number of items can be optionally limited.

Function

APOC Core

apoc.agg.median(number) - returns median for non-null numeric values

Function

APOC Core

apoc.agg.minItems(item, value, groupLimit: -1) - returns a map {items:[], value:n} where value is the minimum value present, and items are all items with the same value. The number of items can be optionally limited.

Function

APOC Core

apoc.agg.nth(value,offset) - returns value of nth row (or -1 for last)

Function

APOC Core

apoc.agg.percentiles(value,[percentiles = 0.5,0.75,0.9,0.95,0.99]) - returns given percentiles for values

Function

APOC Core

apoc.agg.product(number) - returns given product for non-null values

Function

APOC Core

apoc.agg.slice(value, start, length) - returns subset of non-null values, start is 0 based and length can be -1

Function

APOC Core

apoc.agg.statistics(value,[percentiles = 0.5,0.75,0.9,0.95,0.99]) - returns numeric statistics (percentiles, min,minNonZero,max,total,mean,stdev) for values

Function

APOC Core

apoc.algo

Qualified Name Type Release

apoc.algo.aStar(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance','lat','lon') YIELD path, weight - run A* with relationship property name as cost function

Procedure

APOC Core

apoc.algo.aStar(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', {weight:'dist',default:10,x:'lon',y:'lat'}) YIELD path, weight - run A* with relationship property name as cost function

Procedure

APOC Core

apoc.algo.allSimplePaths(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 5) YIELD path, weight - run allSimplePaths with relationships given and maxNodes

Procedure

APOC Core

apoc.algo.cover(nodes) yield rel - returns all relationships between this set of nodes

Procedure

APOC Core

apoc.algo.dijkstra(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', defaultValue, numberOfWantedResults) YIELD path, weight - run dijkstra with relationship property name as cost function

Procedure

APOC Core

apoc.algo.dijkstraWithDefaultWeight(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', 10) YIELD path, weight - run dijkstra with relationship property name as cost function and a default weight if the property does not exist

Procedure

APOC Core

apoc.any

Qualified Name Type Release

returns properties for virtual and real, nodes, rels and maps

Function

APOC Core

returns property for virtual and real, nodes, rels and maps

Function

APOC Core

apoc.atomic

Qualified Name Type Release

apoc.atomic.add(node/relatonship,propertyName,number) Sums the property’s value with the 'number' value

Procedure

APOC Core

apoc.atomic.concat(node/relatonship,propertyName,string) Concats the property’s value with the 'string' value

Procedure

APOC Core

apoc.atomic.insert(node/relatonship,propertyName,position,value) insert a value into the property’s array value at 'position'

Procedure

APOC Core

apoc.atomic.remove(node/relatonship,propertyName,position) remove the element at position 'position'

Procedure

APOC Core

apoc.atomic.subtract(node/relatonship,propertyName,number) Subtracts the 'number' value to the property’s value

Procedure

APOC Core

apoc.atomic.update(node/relatonship,propertyName,updateOperation) update a property’s value with a cypher operation (ex. "n.prop1+n.prop2")

Procedure

APOC Core

apoc.bitwise

Qualified Name Type Release

apoc.bitwise.op(60,'|',13) bitwise operations a & b, a | b, a ^ b, ~a, a >> b, a >>> b, a << b. returns the result of the bitwise operation

Function

APOC Core

apoc.bolt

Qualified Name Type Release

apoc.bolt.execute(url-or-key, kernelTransaction, params, config) - access to other databases via bolt for reads and writes

Procedure

APOC Core

apoc.bolt.load(url-or-key, kernelTransaction, params, config) - access to other databases via bolt for read

Procedure

APOC Core

Procedure

APOC Core

apoc.cluster

Qualified Name Type Release

Procedure

APOC Full

apoc.coll

Qualified Name Type Release

apoc.coll.elements(list,limit,offset) yield _1,_2,..,_10,_1s,_2i,_3f,_4m,_5l,_6n,_7r,_8p - deconstruct subset of mixed list into identifiers of the correct type

Procedure

APOC Core

apoc.coll.partition(list,batchSize)

Procedure

APOC Core

apoc.coll.split(list,value) | splits collection on given values rows of lists, value itself will not be part of resulting lists

Procedure

APOC Core

apoc.coll.zipToRows(list1,list2) - creates pairs like zip but emits one row per pair

Procedure

APOC Core

apoc.coll.avg([0.5,1,2.3])

Function

APOC Core

apoc.coll.avgDuration([duration('P2DT3H'), duration('PT1H45S'), …​]) - returns the average of a list of duration values

Function

APOC Full

apoc.coll.combinations(coll, minSelect, maxSelect:minSelect) - Returns collection of all combinations of list elements of selection size between minSelect and maxSelect (default:minSelect), inclusive

Function

APOC Core

apoc.coll.contains(coll, value) optimized contains operation (using a HashSet) (returns single row or not)

Function

APOC Core

apoc.coll.containsAll(coll, values) optimized contains-all operation (using a HashSet) (returns single row or not)

Function

APOC Core

apoc.coll.containsAllSorted(coll, value) optimized contains-all on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

APOC Core

apoc.coll.containsDuplicates(coll) - returns true if a collection contains duplicate elements

Function

APOC Core

apoc.coll.containsSorted(coll, value) optimized contains on a sorted list operation (Collections.binarySearch) (returns single row or not)

Function

APOC Core

apoc.coll.different(values) - returns true if values are different

Function

APOC Core

apoc.coll.disjunction(first, second) - returns the disjunct set of the two lists

Function

APOC Core

apoc.coll.dropDuplicateNeighbors(list) - remove duplicate consecutive objects in a list

Function

APOC Core

apoc.coll.duplicates(coll) - returns a list of duplicate items in the collection

Function

APOC Core

apoc.coll.duplicatesWithCount(coll) - returns a list of duplicate items in the collection and their count, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}])

Function

APOC Core

apoc.coll.fill(item, count) - returns a list with the given count of items

Function

APOC Core

apoc.coll.flatten(coll, [recursive]) - flattens list (nested if recursive is true)

Function

APOC Core

apoc.coll.frequencies(coll) - returns a list of frequencies of the items in the collection, keyed by item and count (e.g., [{item: xyz, count:2}, {item:zyx, count:5}, {item:abc, count:1}])

Function

APOC Core

apoc.coll.frequenciesAsMap(coll) - return a map of frequencies of the items in the collection, key item, value count (e.g., {1:2, 2:1})

Function

APOC Core

apoc.coll.indexOf(coll, value) | position of value in the list

Function

APOC Core

apoc.coll.insert(coll, index, value) | insert value at index

Function

APOC Core

apoc.coll.insertAll(coll, index, values) | insert values at index

Function

APOC Core

apoc.coll.intersection(first, second) - returns the unique intersection of the two lists

Function

APOC Core

apoc.coll.isEqualCollection(coll, values) return true if two collections contain the same elements with the same cardinality in any order (using a HashMap)

Function

APOC Core

apoc.coll.max([0.5,1,2.3])

Function

APOC Core

apoc.coll.min([0.5,1,2.3])

Function

APOC Core

apoc.coll.occurrences(coll, item) - returns the count of the given item in the collection

Function

APOC Core

apoc.coll.pairs([1,2,3]) returns [1,2],[2,3],[3,null]

Function

APOC Core

apoc.coll.pairsMin([1,2,3]) returns [1,2],[2,3]

Function

APOC Core

apoc.coll.partition(list,batchSize)

Function

APOC Core

apoc.coll.randomItem(coll)- returns a random item from the list, or null on an empty or null list

Function

APOC Core

apoc.coll.randomItems(coll, itemCount, allowRepick: false) - returns a list of itemCount random items from the original list, optionally allowing picked elements to be picked again

Function

APOC Core

apoc.coll.remove(coll, index, [length=1]) | remove range of values from index to length

Function

APOC Core

apoc.coll.removeAll(first, second) - returns first list with all elements of second list removed

Function

APOC Core

apoc.coll.reverse(coll) - returns reversed list

Function

APOC Core

apoc.coll.runningTotal(list1) - returns an accumulative array. For example apoc.coll.runningTotal([1,2,3.5]) return [1,3,6.5]

Function

APOC Core

apoc.coll.set(coll, index, value) | set index to value

Function

APOC Core

apoc.coll.shuffle(coll) - returns the shuffled list

Function

APOC Core

apoc.coll.sort(coll) sort on Collections

Function

APOC Core

apoc.coll.sortMaps([maps], 'name') - sort maps by property

Function

APOC Core

apoc.coll.sortMulti(coll, ['^name','age'],[limit],[skip]) - sort list of maps by several sort fields (ascending with ^ prefix) and optionally applies limit and skip

Function

APOC Core

apoc.coll.sortNodes([nodes], 'name') sort nodes by property

Function

APOC Core

apoc.coll.sortText(coll) sort on string based collections

Function

APOC Core

apoc.coll.stdev(list, isBiasCorrected) - returns the sample or population standard deviation with isBiasCorrected true or false respectively. For example apoc.coll.stdev([10, 12, 23]) return 7

Function

APOC Core

apoc.coll.subtract(first, second) - returns unique set of first list with all elements of second list removed

Function

APOC Core

apoc.coll.sum([0.5,1,2.3])

Function

APOC Core

apoc.coll.sumLongs([1,3,3])

Function

APOC Core

apoc.coll.toSet([list]) returns a unique list backed by a set

Function

APOC Core

apoc.coll.union(first, second) - creates the distinct union of the 2 lists

Function

APOC Core

apoc.coll.unionAll(first, second) - creates the full union with duplicates of the two lists

Function

APOC Core

apoc.coll.zip([list1],[list2])

Function

APOC Core

apoc.config

Qualified Name Type Release

apoc.config.list | Lists the Neo4j configuration as key,value table

Procedure

APOC Full

apoc.config.map | Lists the Neo4j configuration as map

Procedure

APOC Full

apoc.convert

Qualified Name Type Release

apoc.convert.setJsonProperty(node,key,complexValue) - sets value serialized to JSON as property with the given name on the node

Procedure

APOC Core

apoc.convert.toTree([paths],[lowerCaseRels=true], [config]) creates a stream of nested documents representing the at least one root of these paths

Procedure

APOC Core

apoc.convert.fromJsonList('[1,2,3]'[,'json-path', 'path-options'])

Function

APOC Core

apoc.convert.fromJsonMap('{"a":42,"b":"foo","c":[1,2,3]}'[,'json-path', 'path-options'])

Function

APOC Core

apoc.convert.getJsonProperty(node,key[,'json-path', 'path-options']) - converts serialized JSON in property back to original object

Function

APOC Core

apoc.convert.getJsonPropertyMap(node,key[,'json-path', 'path-options']) - converts serialized JSON in property back to map

Function

APOC Core

apoc.convert.toBoolean(value) | tries it’s best to convert the value to a boolean

Function

APOC Core

apoc.convert.toBooleanList(value) | tries it’s best to convert the value to a list of booleans

Function

APOC Core

apoc.convert.toFloat(value) | tries it’s best to convert the value to a float

Function

APOC Core

apoc.convert.toIntList(value) | tries it’s best to convert the value to a list of integers

Function

APOC Core

apoc.convert.toInteger(value) | tries it’s best to convert the value to an integer

Function

APOC Core

apoc.convert.toJson([1,2,3]) or toJson({a:42,b:"foo",c:[1,2,3]}) or toJson(NODE/REL/PATH)

Function

APOC Core

apoc.convert.toList(value) | tries it’s best to convert the value to a list

Function

APOC Core

apoc.convert.toMap(value) | tries it’s best to convert the value to a map

Function

APOC Core

apoc.convert.toNode(value) | tries it’s best to convert the value to a node

Function

APOC Core

apoc.convert.toNodeList(value) | tries it’s best to convert the value to a list of nodes

Function

APOC Core

apoc.convert.toRelationship(value) | tries it’s best to convert the value to a relationship

Function

APOC Core

apoc.convert.toRelationshipList(value) | tries it’s best to convert the value to a list of relationships

Function

APOC Core

apoc.convert.toSet(value) | tries it’s best to convert the value to a set

Function

APOC Core

apoc.convert.toSortedJsonMap(node|map, ignoreCase:true) - returns a JSON map with keys sorted alphabetically, with optional case sensitivity

Function

APOC Core

apoc.convert.toString(value) | tries it’s best to convert the value to a string

Function

APOC Core

apoc.convert.toStringList(value) | tries it’s best to convert the value to a list of strings

Function

APOC Core

apoc.couchbase

Qualified Name Type Release

apoc.couchbase.append(hostOrKey, bucket, documentId, content) yield id, expiry, cas, mutationToken, content - append a couchbase json document to an existing one.

Procedure

APOC Full

apoc.couchbase.exists(hostOrKey, bucket, documentId) yield value - check whether a couchbase json document with the given ID does exist.

Procedure

APOC Full

apoc.couchbase.get(hostOrKey, bucket, documentId) yield id, expiry, cas, mutationToken, content - retrieves a couchbase json document by its unique ID.

Procedure

APOC Full

apoc.couchbase.insert(hostOrKey, bucket, documentId, jsonDocument) yield id, expiry, cas, mutationToken, content - insert a couchbase json document with its unique ID.

Procedure

APOC Full

apoc.couchbase.namedParamsQuery(hostkOrKey, bucket, statement, paramNames, paramValues) yield queryResult - executes a N1QL statement with named parameters.

Procedure

APOC Full

apoc.couchbase.posParamsQuery(hostOrKey, bucket, statement, params) yield queryResult - executes a N1QL statement with positional parameters.

Procedure

APOC Full

apoc.couchbase.prepend(hostOrKey, bucket, documentId, content) yield id, expiry, cas, mutationToken, content - prepend a couchbase json document to an existing one.

Procedure

APOC Full

apoc.couchbase.query(hostOrKey, bucket, statement) yield queryResult - executes a plain un-parameterized N1QL statement.

Procedure

APOC Full

apoc.couchbase.remove(hostOrKey, bucket, documentId) yield id, expiry, cas, mutationToken, content - remove the couchbase json document identified by its unique ID.

Procedure

APOC Full

apoc.couchbase.replace(hostOrKey, bucket, documentId, jsonDocument) yield id, expiry, cas, mutationToken, content - replace the content of the couchbase json document identified by its unique ID.

Procedure

APOC Full

apoc.couchbase.upsert(hostOrKey, bucket, documentId, jsonDocument) yield id, expiry, cas, mutationToken, content - insert or overwrite a couchbase json document with its unique ID.

Procedure

APOC Full

apoc.create

Qualified Name Type Release

apoc.create.addLabels( [node,id,ids,nodes], ['Label',…​]) - adds the given labels to the node or nodes

Procedure

APOC Core

apoc.create.node(['Label'], {key:value,…​}) - create node with dynamic labels

Procedure

APOC Core

apoc.create.nodes(['Label'], [{key:value,…​}]) create multiple nodes with dynamic labels

Procedure

APOC Core

apoc.create.relationship(person1,'KNOWS',{key:value,…​}, person2) create relationship with dynamic rel-type

Procedure

APOC Core

apoc.create.removeLabels( [node,id,ids,nodes], ['Label',…​]) - removes the given labels from the node or nodes

Procedure

APOC Core

apoc.create.removeProperties( [node,id,ids,nodes], [keys]) - removes the given properties from the nodes(s)

Procedure

APOC Core

apoc.create.removeRelProperties( [rel,id,ids,rels], [keys]) - removes the given properties from the relationship(s)

Procedure

APOC Core

apoc.create.setLabels( [node,id,ids,nodes], ['Label',…​]) - sets the given labels, non matching labels are removed on the node or nodes

Procedure

APOC Core

apoc.create.setProperties( [node,id,ids,nodes], [keys], [values]) - sets the given properties on the nodes(s)

Procedure

APOC Core

apoc.create.setProperty( [node,id,ids,nodes], key, value) - sets the given property on the node(s)

Procedure

APOC Core

apoc.create.setRelProperties( [rel,id,ids,rels], [keys], [values]) - sets the given properties on the relationship(s)

Procedure

APOC Core

apoc.create.setRelProperty( [rel,id,ids,rels], key, value) - sets the given property on the relationship(s)

Procedure

APOC Core

apoc.create.uuids(count) yield uuid - creates 'count' UUIDs

Procedure

APOC Core

apoc.create.vNode(['Label'], {key:value,…​}) returns a virtual node

Procedure

APOC Core

apoc.create.vNodes(['Label'], [{key:value,…​}]) returns virtual nodes

Procedure

APOC Core

apoc.create.clonePathToVirtual

Procedure

APOC Core

apoc.create.clonePathsToVirtual

Procedure

APOC Core

apoc.create.vPattern({_labels:['LabelA'],key:value},'KNOWS',{key:value,…​}, {_labels:['LabelB'],key:value}) returns a virtual pattern

Procedure

APOC Core

apoc.create.vPatternFull(['LabelA'],{key:value},'KNOWS',{key:value,…​},['LabelB'],{key:value}) returns a virtual pattern

Procedure

APOC Core

apoc.create.vRelationship(nodeFrom,'KNOWS',{key:value,…​}, nodeTo) returns a virtual relationship

Procedure

APOC Core

apoc.create.virtualPath(['LabelA'],{key:value},'KNOWS',{key:value,…​},['LabelB'],{key:value}) returns a virtual path of nodes joined by a relationship and the associated properties

Procedure

APOC Core

apoc.create.uuid() - creates an UUID

Function

APOC Core

apoc.create.vNode(['Label'], {key:value,…​}) returns a virtual node

Function

APOC Core

apoc.create.vRelationship(nodeFrom,'KNOWS',{key:value,…​}, nodeTo) returns a virtual relationship

Function

APOC Core

apoc.create.virtual.fromNode(node, [propertyNames]) returns a virtual node built from an existing node with only the requested properties

Function

APOC Core

apoc.custom

Qualified Name Type Release

apoc.custom.asFunction(name, statement, outputs, inputs, forceSingle, description) - register a custom cypher function

Procedure

APOC Full

apoc.custom.asProcedure(name, statement, mode, outputs, inputs, description) - register a custom cypher procedure

Procedure

APOC Full

apoc.custom.declareFunction(signature, statement, forceSingle, description) - register a custom cypher function

Procedure

APOC Full

apoc.custom.declareProcedure(signature, statement, mode, description) - register a custom cypher procedure

Procedure

APOC Full

apoc.custom.list() - provide a list of custom procedures/function registered

Procedure

APOC Full

apoc.custom.removeFunction(name, type) - remove the targeted custom function

Procedure

APOC Full

apoc.custom.removeProcedure(name) - remove the targeted custom procedure

Procedure

APOC Full

apoc.cypher

Qualified Name Type Release

apoc.cypher.doIt(fragment, params) yield value - executes writing fragment with the given parameters

Procedure

APOC Core

apoc.cypher.mapParallel(fragment, params, list-to-parallelize) yield value - executes fragment in parallel batches with the list segments being assigned to _

Procedure

APOC Full

apoc.cypher.mapParallel2(fragment, params, list-to-parallelize) yield value - executes fragment in parallel batches with the list segments being assigned to _

Procedure

APOC Full

apoc.cypher.parallel(fragment, paramMap, keyList) yield value - executes fragments in parallel through a list defined in paramMap with a key keyList

Procedure

APOC Full

apoc.cypher.parallel2(fragment, paramMap, keyList) yield value - executes fragments in parallel batches through a list defined in paramMap with a key keyList

Procedure

APOC Full

apoc.cypher.run(fragment, params) yield value - executes reading fragment with the given parameters - currently no schema operations

Procedure

APOC Core

apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) - runs each statement in the file, all semicolon separated - currently no schema operations

Procedure

APOC Full

apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}])) - runs each statement in the files, all semicolon separated

Procedure

APOC Full

apoc.cypher.runMany('cypher;\nstatements;', $params, [{statistics:true,timeout:10}]) - runs each semicolon separated statement and returns summary - currently no schema operations

Procedure

APOC Core

apoc.cypher.runManyReadOnly('cypher;\nstatements;', $params, [{statistics:true,timeout:10}]) - runs each semicolon separated, read-only statement and returns summary - currently no schema operations

Procedure

APOC Core

apoc.cypher.runSchema(statement, params) yield value - executes query schema statement with the given parameters

Procedure

APOC Core

apoc.cypher.runSchemaFile(file or url,[{statistics:true,timeout:10}]) - allows only schema operations, runs each schema statement in the file, all semicolon separated

Procedure

APOC Full

apoc.cypher.runSchemaFiles([files or urls],{statistics:true,timeout:10}) - allows only schema operations, runs each schema statement in the files, all semicolon separated

Procedure

APOC Full

apoc.cypher.runTimeboxed('cypherStatement',{params}, timeout) - abort kernelTransaction after timeout ms if not finished

Procedure

APOC Core

apoc.cypher.runWrite(statement, params) yield value - alias for apoc.cypher.doIt

Procedure

APOC Core

use either apoc.cypher.runFirstColumnMany for a list return or apoc.cypher.runFirstColumnSingle for returning the first row of the first column

Function

APOC Core

apoc.cypher.runFirstColumnMany(statement, params) - executes statement with given parameters, returns first column only collected into a list, params are available as identifiers

Function

APOC Core

apoc.cypher.runFirstColumnSingle(statement, params) - executes statement with given parameters, returns first element of the first column only, params are available as identifiers

Function

APOC Core

apoc.data

Qualified Name Type Release

apoc.data.domain('url_or_email_address') YIELD domain - extract the domain name from a url or an email address. If nothing was found, yield null.

Function

APOC Core

apoc.data.email('email_address') as {personal,user,domain} - extract the personal name, user and domain as a map

Function

APOC Core

apoc.data.url('url') as {protocol,host,port,path,query,file,anchor,user} | turn URL into map structure

Function

APOC Core

apoc.date

Qualified Name Type Release

CALL apoc.date.expire(node,time,'time-unit') - expire node at specified time by setting :TTL label and ttl property

Procedure

APOC Full

CALL apoc.date.expireIn(node,time,'time-unit') - expire node after specified length of time time by setting :TTL label and ttl property

Procedure

APOC Full

apoc.date.add(12345, 'ms', -365, 'd') - given a timestamp in one time unit, adds a value of the specified time unit

Function

APOC Core

apoc.date.convert(12345, 'ms', 'd') - convert a timestamp in one time unit into one of a different time unit

Function

APOC Core

apoc.date.convertFormat('Tue, 14 May 2019 14:52:06 -0400', 'rfc_1123_date_time', 'iso_date_time') - convert a String of one date format into a String of another date format.

Function

APOC Core

apoc.date.currentTimestamp() - returns System.currentTimeMillis() at the time it was called. The value is current throughout transaction execution, and is different from Cypher’s timestamp() function, which does not update within a transaction.

Function

APOC Core

apoc.date.field(12345,('ms|s|m|h|d|month|year'),('TZ')

Function

APOC Core

apoc.date.fields('2012-12-23',('yyyy-MM-dd')) - return columns and a map representation of date parsed with the given format with entries for years,months,weekdays,days,hours,minutes,seconds,zoneid

Function

APOC Core

apoc.date.format(12345,('ms|s|m|h|d'),('yyyy-MM-dd HH:mm:ss zzz'),('TZ')) - get string representation of time value optionally using the specified unit (default ms) using specified format (default ISO) and specified time zone (default current TZ)

Function

APOC Core

apoc.date.fromISO8601('yyyy-MM-ddTHH:mm:ss.SSSZ') - return number representation of time in EPOCH format

Function

APOC Core

apoc.date.parse('2012-12-23','ms|s|m|h|d','yyyy-MM-dd') - parse date string using the specified format into the specified time unit

Function

APOC Core

apoc.date.parseAsZonedDateTime('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset') - parse date string using the specified format to specified timezone

Function

APOC Core

apoc.date.systemTimezone() - returns the system timezone display name

Function

APOC Core

apoc.date.toISO8601(12345,('ms|s|m|h|d') - return string representation of time in ISO8601 format

Function

APOC Core

toYears(timestamp) or toYears(date[,format]) - converts timestamp into floating point years

Function

APOC Core

apoc.diff

Qualified Name Type Release

Function

APOC Core

apoc.do

Qualified Name Type Release

apoc.do.case([condition, query, condition, query, …​], elseQuery:'', params:{}) yield value - given a list of conditional / writing query pairs, executes the query associated with the first conditional evaluating to true (or the else query if none are true) with the given parameters

Procedure

APOC Core

apoc.do.when(condition, ifQuery, elseQuery:'', params:{}) yield value - based on the conditional, executes writing ifQuery or elseQuery with the given parameters

Procedure

APOC Core

apoc.dv

Qualified Name Type Release

Add a virtualized resource configuration

Procedure

APOC Core

List all virtualized resource configs

Procedure

APOC Core

Remove a virtualized resource config by name

Procedure

APOC Core

Query a virtualized resource by name and return virtual nodes

Procedure

APOC Core

Query a virtualized resource by name and return virtual nodes linked using virtual rels to the node passed as first param

Procedure

APOC Core

apoc.es

Qualified Name Type Release

apoc.es.get(host-or-port,index-or-null,type-or-null,id-or-null,query-or-null,payload-or-null) yield value - perform a GET operation on elastic search

Procedure

APOC Full

apoc.es.getRaw(host-or-port,path,payload-or-null) yield value - perform a raw GET operation on elastic search

Procedure

APOC Full

apoc.es.post(host-or-port,index-or-null,type-or-null,query-or-null,payload-or-null) yield value - perform a POST operation on elastic search

Procedure

APOC Full

apoc.es.postRaw(host-or-port,path,payload-or-null) yield value - perform a raw POST operation on elastic search

Procedure

APOC Full

apoc.es.put(host-or-port,index-or-null,type-or-null,id-or-null,query-or-null,payload-or-null) yield value - perform a PUT operation on elastic search

Procedure

APOC Full

apoc.es.query(host-or-port,index-or-null,type-or-null,query-or-null,payload-or-null) yield value - perform a SEARCH operation on elastic search

Procedure

APOC Full

apoc.es.stats(host-url-Key) - elastic search statistics

Procedure

APOC Full

apoc.example

Qualified Name Type Release

apoc.example.movies() | Creates the sample movies graph

Procedure

APOC Core

apoc.export

Qualified Name Type Release

apoc.export.csv.all(file,config) - exports whole database as csv to the provided file

Procedure

APOC Core

apoc.export.csv.data(nodes,rels,file,config) - exports given nodes and relationships as csv to the provided file

Procedure

APOC Core

apoc.export.csv.graph(graph,file,config) - exports given graph object as csv to the provided file

Procedure

APOC Core

apoc.export.csv.query(query,file,{config,…​,params:{params}}) - exports results from the cypher statement as csv to the provided file

Procedure

APOC Core

apoc.export.cypher.all(file,config) - exports whole database incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypher.data(nodes,rels,file,config) - exports given nodes and relationships incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypher.graph(graph,file,config) - exports given graph object incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypher.query(query,file,config) - exports nodes and relationships from the cypher statement incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypher.schema(file,config) - exports all schema indexes and constraints to cypher

Procedure

APOC Core

apoc.export.cypherAll(file,config) - exports whole database incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypherData(nodes,rels,file,config) - exports given nodes and relationships incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypherGraph(graph,file,config) - exports given graph object incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.cypherQuery(query,file,config) - exports nodes and relationships from the cypher kernelTransaction incl. indexes as cypher statements to the provided file

Procedure

APOC Core

apoc.export.graphml.all(file,config) - exports whole database as graphml to the provided file

Procedure

APOC Core

apoc.export.graphml.data(nodes,rels,file,config) - exports given nodes and relationships as graphml to the provided file

Procedure

APOC Core

apoc.export.graphml.graph(graph,file,config) - exports given graph object as graphml to the provided file

Procedure

APOC Core

apoc.export.graphml.query(query,file,config) - exports nodes and relationships from the cypher statement as graphml to the provided file

Procedure

APOC Core

apoc.export.json.all(file,config) - exports whole database as json to the provided file

Procedure

APOC Core

apoc.export.json.data(nodes,rels,file,config) - exports given nodes and relationships as json to the provided file

Procedure

APOC Core

apoc.export.json.graph(graph,file,config) - exports given graph object as json to the provided file

Procedure

APOC Core

apoc.export.json.query(query,file,{config,…​,params:{params}}) - exports results from the cypher statement as json to the provided file

Procedure

APOC Core

apoc.export.xls.all(file,config) - exports whole database as xls to the provided file

Procedure

APOC Full

apoc.export.xls.data(nodes,rels,file,config) - exports given nodes and relationships as xls to the provided file

Procedure

APOC Full

apoc.export.xls.graph(graph,file,config) - exports given graph object as xls to the provided file

Procedure

APOC Full

apoc.export.xls.query(query,file,{config,…​,params:{params}}) - exports results from the cypher statement as xls to the provided file

Procedure

APOC Full

apoc.generate

Qualified Name Type Release

apoc.generate.ba(noNodes, edgesPerNode, label, type) - generates a random graph according to the Barabasi-Albert model

Procedure

APOC Full

apoc.generate.complete(noNodes, label, type) - generates a random complete graph

Procedure

APOC Full

apoc.generate.er(noNodes, noEdges, label, type) - generates a random graph according to the Erdos-Renyi model

Procedure

APOC Full

apoc.generate.simple(degrees, label, type) - generates a simple random graph according to the given degree distribution

Procedure

APOC Full

apoc.generate.ws(noNodes, degree, beta, label, type) - generates a random graph according to the Watts-Strogatz model

Procedure

APOC Full

apoc.gephi

Qualified Name Type Release

apoc.gephi.add(url-or-key, workspace, data, weightproperty, ['exportproperty']) | streams passed in data to Gephi

Procedure

APOC Full

apoc.get

Qualified Name Type Release

apoc.get.nodes(node|id|[ids]) - quickly returns all nodes with these id’s

Procedure

APOC Full

apoc.get.rels(rel|id|[ids]) - quickly returns all relationships with these id’s

Procedure

APOC Full

apoc.graph

Qualified Name Type Release

apoc.graph.from(data,'name',{properties}) | creates a virtual graph object for later processing it tries its best to extract the graph information from the data you pass in

Procedure

APOC Core

apoc.graph.fromCypher('kernelTransaction',{params},'name',{properties}) - creates a virtual graph object for later processing

Procedure

APOC Core

apoc.graph.fromDB('name',{properties}) - creates a virtual graph object for later processing

Procedure

APOC Core

apoc.graph.fromData([nodes],[relationships],'name',{properties}) | creates a virtual graph object for later processing

Procedure

APOC Core

apoc.graph.fromDocument({json}, {config}) yield graph - transform JSON documents into graph structures

Procedure

APOC Core

apoc.graph.fromPath(path,'name',{properties}) - creates a virtual graph object for later processing

Procedure

APOC Core

apoc.graph.fromPaths([paths],'name',{properties}) - creates a virtual graph object for later processing

Procedure

APOC Core

apoc.graph.validateDocument({json}, {config}) yield row - validates the json, return the result of the validation

Procedure

APOC Core

apoc.hashing

Qualified Name Type Release

calculate a checksum (md5) over a node or a relationship. This deals gracefully with array properties. Two identical entities do share the same hash. Unsuitable for cryptographic use-cases.

Function

APOC Core

calculate a checksum (md5) over a the full graph. Be aware that this function does use in-memomry datastructures depending on the size of your graph. Unsuitable for cryptographic use-cases.

Function

APOC Core

calculate a checksum (md5) over a node or a relationship. This deals gracefully with array properties. Two identical entities do share the same hash. Unsuitable for cryptographic use-cases.

Function

APOC Core

apoc.import

Qualified Name Type Release

apoc.import.csv(nodes, relationships, config) - imports nodes and relationships from the provided CSV files with given labels and types

Procedure

APOC Core

apoc.import.graphml(urlOrBinaryFile,config) - imports graphml file

Procedure

APOC Core

apoc.import.json(urlOrBinaryFile,config) - imports the json list to the provided file

Procedure

APOC Core

apoc.import.xml(file,config) - imports graph from provided file

Procedure

APOC Core

apoc.json

Qualified Name Type Release

apoc.json.path('{json}' [,'json-path' , 'path-options'])

Function

APOC Core

apoc.label

Qualified Name Type Release

apoc.label.exists(element, label) - returns true or false related to label existance

Function

APOC Core

apoc.load

Qualified Name Type Release

apoc.load.csv('urlOrBinary',{config}) YIELD lineNo, list, map - load CSV from URL as stream of values, config contains any of: {skip:1,limit:5,header:false,sep:'TAB',ignore:['tmp'],nullValues:['na'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false}}

Procedure

APOC Full

apoc.load.csvParams('urlOrBinary', {httpHeader: value}, payload, {config}) YIELD lineNo, list, map - load from CSV URL (e.g. web-api) while sending headers / payload to load CSV from URL as stream of values, config contains any of: {skip:1,limit:5,header:false,sep:'TAB',ignore:['tmp'],nullValues:['na'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false}}

Procedure

APOC Full

apoc.load.directory('pattern', 'urlDir', {config}) YIELD value - Loads list of all files in folder specified by urlDir or in import folder if urlDir string is empty or not specified

Procedure

APOC Full

apoc.load.directory.async.add(name, cypher, pattern, urlDir, {}) YIELD name, status, pattern, cypher, urlDir, config, error - Add or replace a folder listener with a specific name, pattern and url directory that execute the specified cypher query when an event is triggered and return listener list

Procedure

APOC Core

apoc.load.directory.async.list() YIELD name, status, pattern, cypher, urlDir, config, error - List of all folder listeners

Procedure

APOC Core

apoc.load.directory.async.remove(name) YIELD name, status, pattern, cypher, urlDir, config, error - Remove a folder listener by name and return remaining listeners, if any

Procedure

APOC Core

apoc.load.directory.async.removeAll() - Remove all folder listeners

Procedure

APOC Core

apoc.load.driver('org.apache.derby.jdbc.EmbeddedDriver') register JDBC driver of source database

Procedure

APOC Full

apoc.load.html('url',{name: jquery, name2: jquery}, config) YIELD value - Load Html page and return the result as a Map

Procedure

APOC Full

apoc.load.jdbc('key or url','table or statement', params, config) YIELD row - load from relational database, from a full table or a sql statement

Procedure

APOC Full

deprecated - please use: apoc.load.jdbc('key or url','',[params]) YIELD row - load from relational database, from a sql statement with parameters

Procedure

APOC Full

apoc.load.jdbcUpdate('key or url','statement',[params],config) YIELD row - update relational database, from a SQL statement with optional parameters

Procedure

APOC Full

apoc.load.json('urlOrKeyOrBinary',path, config) YIELD value - import JSON as stream of values if the JSON was an array or a single value if it was a map

Procedure

APOC Core

apoc.load.jsonArray('url') YIELD value - load array from JSON URL (e.g. web-api) to import JSON as stream of values

Procedure

APOC Core

apoc.load.jsonParams('urlOrKeyOrBinary',{header:value},payload, config) YIELD value - load from JSON URL (e.g. web-api) while sending headers / payload to import JSON as stream of values if the JSON was an array or a single value if it was a map

Procedure

APOC Core

apoc.load.ldap("key" or {connectionMap},{searchMap}) Load entries from an ldap source (yield entry)

Procedure

APOC Full

apoc.load.xls('url','selector',{config}) YIELD lineNo, list, map - load XLS fom URL as stream of row values, config contains any of: {skip:1,limit:5,header:false,ignore:['tmp'],arraySep:';',mapping:{years:{type:'int',arraySep:'-',array:false,name:'age',ignore:false, dateFormat:'iso_date', dateParse:['dd-MM-yyyy']}}

Procedure

APOC Full

apoc.load.xml('http://example.com/test.xml', 'xPath',config, false) YIELD value as doc CREATE (p:Person) SET p.name = doc.name - load from XML URL (e.g. web-api) to import XML as single nested map with attributes and _type, _text and _childrenx fields.

Procedure

APOC Core

apoc.lock

Qualified Name Type Release

apoc.lock.all([nodes],[relationships]) acquires a write lock on the given nodes and relationships

Procedure

APOC Core

apoc.lock.nodes([nodes]) acquires a write lock on the given nodes

Procedure

APOC Core

apoc.lock.read.nodes([nodes]) acquires a read lock on the given nodes

Procedure

APOC Core

apoc.lock.read.rels([relationships]) acquires a read lock on the given relationship

Procedure

APOC Core

apoc.lock.rels([relationships]) acquires a write lock on the given relationship

Procedure

APOC Core

apoc.log

Qualified Name Type Release

apoc.log.debug(message, params) - logs debug message

Procedure

APOC Full

apoc.log.error(message, params) - logs error message

Procedure

APOC Full

apoc.log.info(message, params) - logs info message

Procedure

APOC Full

apoc.log.stream('neo4j.log', { last: n }) - retrieve log file contents, optionally return only the last n lines

Procedure

APOC Core

apoc.log.warn(message, params) - logs warn message

Procedure

APOC Full

apoc.map

Qualified Name Type Release

apoc.map.clean(map,[skip,keys],[skip,values]) yield map filters the keys and values contained in those lists, good for data cleaning from CSV/JSON

Function

APOC Core

apoc.map.flatten(map, delimiter:'.') yield map - flattens nested items in map using dot notation

Function

APOC Core

apoc.map.fromLists([keys],[values])

Function

APOC Core

apoc.map.fromNodes(label, property)

Function

APOC Core

apoc.map.fromPairs([[key,value],[key2,value2],…​])

Function

APOC Core

apoc.map.fromValues([key1,value1,key2,value2,…​])

Function

APOC Core

apoc.map.get(map,key,[default],[fail=true]) - returns value for key or throws exception if key doesn’t exist and no default given

Function

APOC Core

apoc.map.groupBy([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with single values

Function

APOC Core

apoc.map.groupByMulti([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with list values

Function

APOC Core

apoc.map.merge(first,second) - merges two maps

Function

APOC Core

apoc.map.mergeList([{maps}]) yield value - merges all maps in the list into one

Function

APOC Core

apoc.map.mget(map,key,[defaults],[fail=true]) - returns list of values for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

APOC Core

apoc.map.removeKey(map,key,{recursive:true/false}) - remove the key from the map (recursively if recursive is true)

Function

APOC Core

apoc.map.removeKeys(map,[keys],{recursive:true/false}) - remove the keys from the map (recursively if recursive is true)

Function

APOC Core

apoc.map.setEntry(map,key,value)

Function

APOC Core

apoc.map.setKey(map,key,value)

Function

APOC Core

apoc.map.setLists(map,[keys],[values])

Function

APOC Core

apoc.map.setPairs(map,[[key1,value1],[key2,value2])

Function

APOC Core

apoc.map.setValues(map,[key1,value1,key2,value2])

Function

APOC Core

apoc.map.sortedProperties(map, ignoreCase:true) - returns a list of key/value list pairs, with pairs sorted by keys alphabetically, with optional case sensitivity

Function

APOC Core

apoc.map.submap(map,keys,[defaults],[fail=true]) - returns submap for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

APOC Core

apoc.map.unflatten(map, delimiter:'.') yield map - unflat from items separated by delimiter string to nested items (reverse of apoc.map.flatten function)

Function

APOC Core

apoc.map.updateTree(tree,key,) returns map - adds the {data} map on each level of the nested tree, where the key-value pairs match

Function

APOC Core

apoc.map.values(map, [key1,key2,key3,…​],[addNullsForMissing]) returns list of values indicated by the keys

Function

APOC Core

apoc.math

Qualified Name Type Release

apoc.math.regr(label, propertyY, propertyX) - It calculates the coefficient of determination (R-squared) for the values of propertyY and propertyX in the provided label

Procedure

APOC Core

apoc.math.cosh(val) | returns the hyperbolic cosin

Function

APOC Core

apoc.math.coth(val) | returns the hyperbolic cotangent

Function

APOC Core

apoc.math.csch(val) | returns the hyperbolic cosecant

Function

APOC Core

apoc.math.maxByte() | return the maximum value an byte can have

Function

APOC Core

apoc.math.maxDouble() | return the largest positive finite value of type double

Function

APOC Core

apoc.math.maxInt() | return the maximum value an int can have

Function

APOC Core

apoc.math.maxLong() | return the maximum value a long can have

Function

APOC Core

apoc.math.minByte() | return the minimum value an byte can have

Function

APOC Core

apoc.math.minDouble() | return the smallest positive nonzero value of type double

Function

APOC Core

apoc.math.minInt() | return the minimum value an int can have

Function

APOC Core

apoc.math.minLong() | return the minimum value a long can have

Function

APOC Core

apoc.math.round(value,[precision],mode=['CEILING','FLOOR','UP','DOWN','HALF_EVEN','HALF_DOWN','HALF_UP','DOWN','UNNECESSARY'])

Function

APOC Core

apoc.math.sech(val) | returns the hyperbolic secant

Function

APOC Core

apoc.math.sigmoid(val) | returns the sigmoid value

Function

APOC Core

apoc.math.sigmoidPrime(val) | returns the sigmoid prime [ sigmoid(val) * (1 - sigmoid(val)) ]

Function

APOC Core

apoc.math.sinh(val) | returns the hyperbolic sin

Function

APOC Core

apoc.math.tanh(val) | returns the hyperbolic tangent

Function

APOC Core

apoc.merge

Qualified Name Type Release

"apoc.merge.node.eager(['Label'], identProps:{key:value, …​}, onCreateProps:{key:value,…​}, onMatchProps:{key:value,…​}}) - merge nodes with dynamic labels, with support for setting properties ON CREATE or ON MATCH

Procedure

APOC Core

apoc.merge.node.eager(['Label'], identProps:{key:value, …​}, onCreateProps:{key:value,…​}, onMatchProps:{key:value,…​}}) - merge nodes eagerly, with dynamic labels, with support for setting properties ON CREATE or ON MATCH

Procedure

APOC Core

apoc.merge.relationship(startNode, relType, identProps:{key:value, …​}, onCreateProps:{key:value, …​}, endNode, onMatchProps:{key:value, …​}) - merge relationship with dynamic type, with support for setting properties ON CREATE or ON MATCH

Procedure

APOC Core

apoc.merge.relationship(startNode, relType, identProps:{key:value, …​}, onCreateProps:{key:value, …​}, endNode, onMatchProps:{key:value, …​}) - merge relationship with dynamic type, with support for setting properties ON CREATE or ON MATCH

Procedure

APOC Core

apoc.meta

Qualified Name Type Release

apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information

Procedure

APOC Core

apoc.meta.data.of({graph}, {config}) - examines a subset of the graph to provide a tabular meta information

Procedure

APOC Core

apoc.meta.graph - examines the full graph to create the meta-graph

Procedure

APOC Core

apoc.meta.graph.of({graph}, {config}) - examines a subset of the graph to provide a graph meta information

Procedure

APOC Core

apoc.meta.graphSample() - examines the database statistics to build the meta graph, very fast, might report extra relationships

Procedure

APOC Core

apoc.meta.nodeTypeProperties()

Procedure

APOC Core

apoc.meta.relTypeProperties()

Procedure

APOC Core

apoc.meta.schema({config}) - examines a subset of the graph to provide a map-like meta information

Procedure

APOC Core

apoc.meta.stats yield labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount, labels, relTypes, stats | returns the information stored in the transactional database statistics

Procedure

APOC Core

apoc.meta.subGraph({labels:[labels],rels:[rel-types], excludes:[labels,rel-types]}) - examines a sample sub graph to create the meta-graph

Procedure

APOC Core

apoc.meta.cypher.isType(value,type) - returns a row if type name matches none if not (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)

Function

APOC Core

apoc.meta.cypher.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,MAP,LIST OF <TYPE>,POINT,DATE,DATE_TIME,LOCAL_TIME,LOCAL_DATE_TIME,TIME,DURATION)

Function

APOC Core

apoc.meta.cypher.types(node-relationship-map) - returns a map of keys to types

Function

APOC Core

apoc.meta.isType(value,type) - returns a row if type name matches none if not (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

APOC Core

apoc.meta.nodes.count([labels], $config) - Returns the sum of the nodes with a label present in the list.

Function

APOC Core

apoc.meta.type(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

APOC Core

apoc.meta.typeName(value) - type name of a value (INTEGER,FLOAT,STRING,BOOLEAN,RELATIONSHIP,NODE,PATH,NULL,UNKNOWN,MAP,LIST)

Function

APOC Core

apoc.meta.types(node-relationship-map) - returns a map of keys to types

Function

APOC Core

apoc.metrics

Qualified Name Type Release

apoc.metrics.get(metricName, {}) - retrieve a system metric by its metric name. Additional configuration options may be passed matching the options available for apoc.load.csv.

Procedure

APOC Full

apoc.metrics.list() - get a list of available metrics

Procedure

APOC Full

apoc.metrics.storage(directorySetting) - retrieve storage metrics about the devices Neo4j uses for data storage. directorySetting may be any valid neo4j directory setting name, such as 'dbms.directories.data'. If null is provided as a directorySetting, you will get back all available directory settings. For a list of available directory settings, see the Neo4j operations manual reference on configuration settings. Directory settings are not paths, they are a neo4j.conf setting key name

Procedure

APOC Full

apoc.model

Qualified Name Type Release

apoc.model.jdbc('key or url', {schema:'<schema>', write: <true/false>, filters: { tables:[], views: [], columns: []}) YIELD nodes, relationships - load schema from relational database

Procedure

APOC Full

apoc.mongo

Qualified Name Type Release

apoc.mongo.aggregate(uri, pipeline, $config) yield value - perform an aggregate operation on mongodb collection

Procedure

APOC Core

apoc.mongo.count(uri, query, $config) yield value - perform a count operation on mongodb collection

Procedure

APOC Core

apoc.mongo.delete(uri, query, $config) - delete the given documents from the mongodb collection and returns the number of affected documents

Procedure

APOC Core

apoc.mongo.find(uri, query, $config) yield value - perform a find operation on mongodb collection

Procedure

APOC Core

apoc.mongo.insert(uri, documents, $config) yield value - inserts the given documents into the mongodb collection

Procedure

APOC Core

apoc.mongo.update(uri, query, update, $config) - updates the given documents from the mongodb collection and returns the number of affected documents

Procedure

APOC Core

apoc.mongodb

Qualified Name Type Release

apoc.mongodb.count(host-or-key,db,collection,query) yield value - perform a find operation on mongodb collection

Procedure

APOC Full

apoc.mongodb.delete(host-or-key,db,collection,query) - delete the given documents from the mongodb collection and returns the number of affected documents

Procedure

APOC Full

apoc.mongodb.find(host-or-key,db,collection,query,projection,sort,[compatibleValues=false|true],skip-or-null,limit-or-null,[extractReferences=false|true],[objectIdAsMap=true|false]) yield value - perform a find,project,sort operation on mongodb collection

Procedure

APOC Full

apoc.mongodb.first(host-or-key,db,collection,query,[compatibleValues=false|true],[extractReferences=false|true],[objectIdAsMap=true|false]) yield value - perform a first operation on mongodb collection

Procedure

APOC Full

apoc.mongodb.get(host-or-key,db,collection,query,[compatibleValues=false|true],skip-or-null,limit-or-null,[extractReferences=false|true],[objectIdAsMap=true|false]) yield value - perform a find operation on mongodb collection

Procedure

APOC Full

apoc.mongodb.get.byObjectId(hostOrKey, db, collection, objectIdValue, config(default:{})) - get the document by Object id value

Procedure

APOC Full

apoc.mongodb.insert(host-or-key,db,collection,documents) - inserts the given documents into the mongodb collection

Procedure

APOC Full

apoc.mongodb.update(host-or-key,db,collection,query,update) - updates the given documents from the mongodb collection and returns the number of affected documents

Procedure

APOC Full

apoc.monitor

Qualified Name Type Release

apoc.monitor.ids() returns the object ids in use for this neo4j instance

Procedure

APOC Core

apoc.monitor.kernel() returns informations about the neo4j kernel

Procedure

APOC Core

apoc.monitor.store() returns informations about the sizes of the different parts of the neo4j graph store

Procedure

APOC Core

apoc.monitor.tx() returns informations about the neo4j transaction manager

Procedure

APOC Core

apoc.neighbors

Qualified Name Type Release

apoc.neighbors.athop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at a distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.neighbors.athop.count(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at a distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.neighbors.byhop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at each distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.neighbors.byhop.count(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern at each distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.neighbors.tohop(node, rel-direction-pattern, distance) - returns distinct nodes of the given relationships in the pattern up to a certain distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.neighbors.tohop.count(node, rel-direction-pattern, distance) - returns distinct count of nodes of the given relationships in the pattern up to a certain distance, can use '>' or '<' for all outgoing or incoming relationships

Procedure

APOC Core

apoc.nlp

Qualified Name Type Release

Creates a (virtual) entity graph for provided text

Procedure

APOC Full

Returns a stream of entities for provided text

Procedure

APOC Full

Creates a (virtual) key phrases graph for provided text

Procedure

APOC Full

Returns a stream of key phrases for provided text

Procedure

APOC Full

Creates a (virtual) sentiment graph for provided text

Procedure

APOC Full

Returns stream of sentiment for items in provided text

Procedure

APOC Full

Creates a (virtual) entity graph for provided text

Procedure

APOC Core

Provides a entity analysis for provided text

Procedure

APOC Core

Creates a (virtual) key phrase graph for provided text

Procedure

APOC Core

Provides a entity analysis for provided text

Procedure

APOC Core

Creates a (virtual) sentiment graph for provided text

Procedure

APOC Core

Provides a sentiment analysis for provided text

Procedure

APOC Core

Classifies a document into categories.

Procedure

APOC Full

Classifies a document into categories.

Procedure

APOC Full

Creates a (virtual) entity graph for provided text

Procedure

APOC Full

Returns a stream of entities for provided text

Procedure

APOC Full

apoc.node

Qualified Name Type Release

apoc.node.degree(node, rel-direction-pattern) - returns total degrees of the given relationships in the pattern, can use '>' or '<' for all outgoing or incoming relationships

Function

APOC Core

apoc.node.degree.in(node, relationshipName) - returns total number number of incoming relationships

Function

APOC Core

apoc.node.degree.out(node, relationshipName) - returns total number number of outgoing relationships

Function

APOC Core

returns id for (virtual) nodes

Function

APOC Core

returns labels for (virtual) nodes

Function

APOC Core

apoc.node.relationship.exists(node, rel-direction-pattern) - returns true when the node has the relationships of the pattern

Function

APOC Core

apoc.node.relationship.types(node, rel-direction-pattern) - returns a list of distinct relationship types

Function

APOC Core

apoc.node.relationships.exist(node, rel-direction-pattern) - returns a map with rel-pattern, boolean for the given relationship patterns

Function

APOC Core

apoc.nodes

Qualified Name Type Release

apoc.nodes.collapse([nodes…​],[{properties:'overwrite' or 'discard' or 'combine'}]) yield from, rel, to merge nodes onto first in list

Procedure

APOC Core

CALL apoc.nodes.cycles([nodes], $config) - Detect all path cycles from node list

Procedure

APOC Core

apoc.nodes.delete(node|nodes|id|[ids]) - quickly delete all nodes with these ids

Procedure

APOC Core

apoc.nodes.get(node|nodes|id|[ids]) - quickly returns all nodes with these ids

Procedure

APOC Core

Procedure

APOC Core

apoc.nodes.link([nodes],'REL_TYPE', conf) - creates a linked list of nodes from first to last

Procedure

APOC Core

apoc.get.rels(rel|id|[ids]) - quickly returns all relationships with these ids

Procedure

APOC Core

apoc.nodes.connected(start, end, rel-direction-pattern) - returns true when the node is connected to the other node, optimized for dense nodes

Function

APOC Core

apoc.nodes.isDense(node) - returns true if it is a dense node

Function

APOC Core

apoc.nodes.relationship.types(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and types which is a list of distinct relationship types

Function

APOC Core

apoc.nodes.relationships.exist(node|nodes|id|[ids], rel-direction-pattern) - returns a list of maps where each one has two fields: node which is the node subject of the analysis and exists which is a map with rel-pattern, boolean for the given relationship patterns

Function

APOC Core

apoc.number

Qualified Name Type Release

apoc.number.arabicToRoman(number) | convert arabic numbers to roman

Function

APOC Core

apoc.number.exact.add(stringA,stringB) - return the sum’s result of two large numbers

Function

APOC Core

apoc.number.exact.div(stringA,stringB,[prec],[roundingModel]) - return the division’s result of two large numbers

Function

APOC Core

apoc.number.exact.mul(stringA,stringB,[prec],[roundingModel]) - return the multiplication’s result of two large numbers

Function

APOC Core

apoc.number.exact.sub(stringA,stringB) - return the substraction’s of two large numbers

Function

APOC Core

apoc.number.exact.toExact(number) - return the exact value

Function

APOC Core

apoc.number.exact.toFloat(string,[prec],[roundingMode]) - return the Float value of a large number

Function

APOC Core

apoc.number.exact.toInteger(string,[prec],[roundingMode]) - return the Integer value of a large number

Function

APOC Core

apoc.number.format(number) | format a long or double using the default system pattern and language to produce a string

Function

APOC Core

apoc.number.parseFloat(text) | parse a text using the default system pattern and language to produce a double

Function

APOC Core

apoc.number.parseInt(text) | parse a text using the default system pattern and language to produce a long

Function

APOC Core

apoc.number.romanToArabic(romanNumber) | convert roman numbers to arabic

Function

APOC Core

apoc.path

Qualified Name Type Release

apoc.path.expand(startNode <id>|Node|list, 'TYPE|TYPE_OUT>|<TYPE_IN', '+YesLabel|-NoLabel', minLevel, maxLevel ) yield path - expand from start node following the given relationships from min to max-level adhering to the label filters

Procedure

APOC Core

apoc.path.expandConfig(startNode <id>|Node|list, {minLevel,maxLevel,uniqueness,relationshipFilter,labelFilter,uniqueness:'RELATIONSHIP_PATH',bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield path - expand from start node following the given relationships from min to max-level adhering to the label filters.

Procedure

APOC Core

apoc.path.spanningTree(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield path - expand a spanning tree reachable from start node following relationships to max-level adhering to the label filters

Procedure

APOC Core

apoc.path.subgraphAll(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield nodes, relationships - expand the subgraph reachable from start node following relationships to max-level adhering to the label filters, and also return all relationships within the subgraph

Procedure

APOC Core

apoc.path.subgraphNodes(startNode <id>|Node|list, {maxLevel,relationshipFilter,labelFilter,bfs:true, filterStartNode:false, limit:-1, optional:false, endNodes:[], terminatorNodes:[], sequence, beginSequenceAtStart:true}) yield node - expand the subgraph nodes reachable from start node following relationships to max-level adhering to the label filters

Procedure

APOC Core

apoc.path.combine(path1, path2) - combines the paths into one if the connecting node matches

Function

APOC Core

apoc.path.create(startNode,[rels]) - creates a path instance of the given elements

Function

APOC Core

apoc.path.elements(path) - returns a list of node-relationship-node-…​

Function

APOC Core

apoc.path.slice(path, [offset], [length]) - creates a sub-path with the given offset and length

Function

APOC Core

apoc.periodic

Qualified Name Type Release

apoc.periodic.cancel(name) - cancel job with the given name

Procedure

APOC Core

apoc.periodic.commit(statement,params) - runs the given statement in separate transactions until it returns 0

Procedure

APOC Core

apoc.periodic.countdown('name',statement,repeat-rate-in-seconds) submit a repeatedly-called background statement until it returns 0

Procedure

APOC Core

apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second statement for each item returned by the first statement. Returns number of batches and total processed rows

Procedure

APOC Core

apoc.periodic.list - list all jobs

Procedure

APOC Core

apoc.periodic.repeat('name',statement, rateOrTime, config) submit a repeatedly-called background statement. Fourth parameter 'config' is optional and can contain 'params' entry for nested statement.

Procedure

APOC Core

apoc.periodic.rock_n_roll('some cypher for iteration', 'some cypher as action on each iteration', 10000) YIELD batches, total - run the action statement in batches over the iterator statement’s results in a separate thread. Returns number of batches and total processed rows

Procedure

APOC Full

apoc.periodic.rock_n_roll_while('some cypher for knowing when to stop', 'some cypher for iteration', 'some cypher as action on each iteration', 10000) YIELD batches, total - run the action statement in batches over the iterator statement’s results in a separate thread. Returns number of batches and total processed rows

Procedure

APOC Full

apoc.periodic.submit('name',statement) - submit a one-off background statement

Procedure

APOC Core

apoc.periodic.truncate({config}) - removes all entities (and optionally indexes and constraints) from db using the apoc.periodic.iterate under the hood

Procedure

APOC Core

apoc.redis

Qualified Name Type Release

apoc.redis.append(uri, key, value, {config}) | Execute the 'APPEND key value' command

Procedure

APOC Full

apoc.redis.configGet(uri, parameter, {config}) | Execute the 'CONFIG GET parameter' command

Procedure

APOC Full

apoc.redis.configSet(uri, parameter, {config}) | Execute the 'CONFIG SET parameter value' command

Procedure

APOC Full

apoc.redis.copy(uri, source, destination, {config}) | Execute the 'COPY source destination' command and returns true if source was copied and false otherwise

Procedure

APOC Full

apoc.redis.eval(uri, script, outputType, keys, values, {config}) | Execute the 'EVAL script' command. In the parameters provided to the procedure, keys are bound to the KEYS[n] like special array of the Lua script and values are bound to the ARGV[n] like special array of the Lua script.

Procedure

APOC Full

apoc.redis.exists(uri, keys, {config}) | Execute the 'EXISTS keys' command

Procedure

APOC Full

apoc.redis.get(uri, key, {config}) | Execute the 'GET key' command

Procedure

APOC Full

apoc.redis.hdel(uri, key, fields, {config}) | Execute the 'HDEL key fields' command

Procedure

APOC Full

apoc.redis.hexists(uri, key, field, {config}) | Execute the 'HEXISTS key field' command

Procedure

APOC Full

apoc.redis.hget(uri, key, field, {config}) | Execute the 'HGET key field' command

Procedure

APOC Full

apoc.redis.hgetall(uri, key, {config}) | Execute the 'HGETALL key' command

Procedure

APOC Full

apoc.redis.hincrby(uri, key, field, amount, {config}) | Execute the 'HINCRBY key field amount' command

Procedure

APOC Full

apoc.redis.hset(uri, key, field, value, {config}) | Execute the 'HSET key field value' command and returns true if it is a new field in the hash or false if the field already exists

Procedure

APOC Full

apoc.redis.incrby(uri, key, amount, {config}) | Execute the 'INCRBY key increment' command

Procedure

APOC Full

apoc.redis.info(uri, {config}) | Execute the 'INFO' command

Procedure

APOC Full

apoc.redis.lrange(uri, key, start, stop, {config}) | Execute the 'LRANGE key start stop' command

Procedure

APOC Full

apoc.redis.persist(uri, key, {config}) | Execute the 'PERSIST key' command

Procedure

APOC Full

apoc.redis.pexpire(uri, key, time, isExpireAt {config}) | Execute the 'PEXPIRE key time' command, or the 'PEPXPIREAT' if isExpireAt=true

Procedure

APOC Full

apoc.redis.pop(uri, key, {config}) | Execute the 'LPOP key' command, or the 'RPOP' if config right=true (default)

Procedure

APOC Full

apoc.redis.pttl(uri, key, {config}) | Execute the 'PTTL key' command

Procedure

APOC Full

apoc.redis.push(uri, key, values, {config}) | Execute the 'LPUSH key field values' command, or the 'RPUSH' if config right=true (default)

Procedure

APOC Full

apoc.redis.sadd(uri, key, members, {config}) | Execute the 'SADD key members' command

Procedure

APOC Full

apoc.redis.scard(uri, key, {config}) | Execute the 'SCARD key' command

Procedure

APOC Full

apoc.redis.getSet(uri, key, value, {config}) | Execute the 'SET key value' command and return old value stored (or null if did not exists)

Procedure

APOC Full

apoc.redis.smembers(uri, key, {config}) | Execute the 'SMEMBERS key' command

Procedure

APOC Full

apoc.redis.spop(uri, key, {config}) | Execute the 'SPOP key' command

Procedure

APOC Full

apoc.redis.sunion(uri, keys, {config}) | Execute the 'SUNION keys' command

Procedure

APOC Full

apoc.redis.zadd(uri, keys, scoresAndMembers, {config}) | Execute the 'ZADD key scoresAndMembers' command, where scoresAndMembers is a list of score,member,score,member,…​

Procedure

APOC Full

apoc.redis.zcard(uri, key, {config}) | Execute the 'ZCARD key' command

Procedure

APOC Full

apoc.redis.zrangebyscore(uri, key, min, max, {config}) | Execute the 'ZRANGEBYSCORE key min max' command

Procedure

APOC Full

apoc.redis.zrem(uri, key, members, {config}) | Execute the 'ZREM key members' command

Procedure

APOC Full

apoc.refactor

Qualified Name Type Release

apoc.refactor.categorize(sourceKey, type, outgoing, label, targetKey, copiedKeys, batchSize) turn each unique propertyKey into a category node and connect to it

Procedure

APOC Core

apoc.refactor.cloneNodes([node1,node2,…​]) clone nodes with their labels and properties

Procedure

APOC Core

apoc.refactor.cloneNodesWithRelationships([node1,node2,…​]) clone nodes with their labels, properties and relationships

Procedure

APOC Core

apoc.refactor.cloneSubgraph([node1,node2,…​], [rel1,rel2,…​]:[], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the given relationships (will exist between cloned nodes only). If no relationships are provided, all relationships between the given nodes will be cloned. Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

APOC Core

apoc.refactor.cloneSubgraphFromPaths([path1, path2, …​], {standinNodes:[], skipProperties:[]}) YIELD input, output, error | from the subgraph formed from the given paths, clone nodes with their labels and properties (optionally skipping any properties in the skipProperties list via the config map), and clone the relationships (will exist between cloned nodes only). Relationships can be optionally redirected according to standinNodes node pairings (this is a list of list-pairs of nodes), so given a node in the original subgraph (first of the pair), an existing node (second of the pair) can act as a standin for it within the cloned subgraph. Cloned relationships will be redirected to the standin.

Procedure

APOC Core

apoc.refactor.collapseNode([node1,node2],'TYPE') collapse node to relationship, node with one rel becomes self-relationship

Procedure

APOC Core

apoc.refactor.deleteAndReconnect([pathLinkedList], [nodesToRemove], {config}) - Removes some nodes from a linked list

Procedure

APOC Core

apoc.refactor.extractNode([rel1,rel2,…​], [labels],'OUT','IN') extract node from relationships

Procedure

APOC Core

apoc.refactor.from(rel, startNode) redirect relationship to use new start-node

Procedure

APOC Core

apoc.refactor.invert(rel) inverts relationship direction

Procedure

APOC Core

apoc.refactor.mergeNodes([node1,node2],[{properties:'overwrite' or 'discard' or 'combine'}]) merge nodes onto first in list

Procedure

APOC Core

apoc.refactor.mergeRelationships([rel1,rel2]) merge relationships onto first in list

Procedure

APOC Core

apoc.refactor.normalizeAsBoolean(entity, propertyKey, true_values, false_values) normalize/convert a property to be boolean

Procedure

APOC Core

apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.nodeProperty(oldName, newName, [nodes], {config}) | rename all node’s property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.type(oldType, newType, [rels], {config}) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.rename.typeProperty(oldName, newName, [rels], {config}) | rename all relationship’s property from 'oldName' to 'newName'. If 'rels' is provided renaming is applied to this set only

Procedure

APOC Core

apoc.refactor.setType(rel, 'NEW-TYPE') change relationship-type

Procedure

APOC Core

apoc.refactor.to(rel, endNode) redirect relationship to use new end-node

Procedure

APOC Core

apoc.rel

Qualified Name Type Release

returns endNode for (virtual) relationships

Function

APOC Core

returns id for (virtual) relationships

Function

APOC Core

returns startNode for (virtual) relationships

Function

APOC Core

returns type for (virtual) relationships

Function

APOC Core

apoc.schema

Qualified Name Type Release

apoc.schema.assert({indexLabel:, …​}, {constraintLabel:[constraintKeys], …​}, dropExisting : true) yield label, key, keys, unique, action - drops all other existing indexes and constraints when dropExisting is true (default is true), and asserts that at the end of the operation the given indexes and unique constraints are there, each label:key pair is considered one constraint/label. Non-constraint indexes can define compound indexes with label:[key1,key2…​] pairings.

Procedure

APOC Core

CALL apoc.schema.nodes([config]) yield name, label, properties, status, type

Procedure

APOC Core

apoc.schema.properties.distinct(label, key) - quickly returns all distinct values for a given key

Procedure

APOC Core

apoc.schema.properties.distinctCount([label], [key]) YIELD label, key, value, count - quickly returns all distinct values and counts for a given key

Procedure

APOC Core

CALL apoc.schema.relationships([config]) yield name, startLabel, type, endLabel, properties, status

Procedure

APOC Core

RETURN apoc.schema.node.constraintExists(labelName, propertyNames)

Function

APOC Core

RETURN apoc.schema.node.indexExists(labelName, propertyNames)

Function

APOC Core

RETURN apoc.schema.relationship.constraintExists(type, propertyNames)

Function

APOC Core

RETURN apoc.schema.relationship.indexExists(relName, propertyNames)

Function

APOC Core

apoc.scoring

Qualified Name Type Release

apoc.scoring.existence(5, true) returns the provided score if true, 0 if false

Function

APOC Core

apoc.scoring.pareto(10, 20, 100, 11) applies a Pareto scoring function over the inputs

Function

APOC Core

Qualified Name Type Release

Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.multiSearchReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.

Procedure

APOC Core

Do a parallel search over multiple indexes returning nodes. usage apoc.search.node( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the DISTINCT Nodes found in the different searches.

Procedure

APOC Core

Do a parallel search over multiple indexes returning nodes. usage apoc.search.nodeAll( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the Nodes found in the different searches.

Procedure

APOC Core

Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched property. apoc.search.nodeShortAll( map of label and properties which will be searched upon, operator: EXACT / CONTAINS / STARTS WITH | ENDS WITH / = / <> / < / > …​, value ). All 'hits' are returned.

Procedure

APOC Core

Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.nodeReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.

Procedure

APOC Core

apoc.spatial

Qualified Name Type Release

apoc.spatial.geocode('address') YIELD location, latitude, longitude, description, osmData - look up geographic location of address from a geocoding service (the default one is OpenStreetMap)

Procedure

APOC Core

apoc.spatial.geocodeOnce('address') YIELD location, latitude, longitude, description, osmData - look up geographic location of address from a geocoding service (the default one is OpenStreetMap)

Procedure

APOC Core

apoc.spatial.reverseGeocode(latitude,longitude) YIELD location, latitude, longitude, description - look up address from latitude and longitude from a geocoding service (the default one is OpenStreetMap)

Procedure

APOC Core

apoc.spatial.sortByDistance(List<Path>) sort the given paths based on the geo informations (lat/long) in ascending order

Procedure

APOC Core

apoc.static

Qualified Name Type Release

apoc.static.get(name) - returns statically stored value from config (apoc.static.<key>) or server lifetime storage

Procedure

APOC Full

apoc.static.list(prefix) - returns statically stored values from config (apoc.static.<prefix>.*) or server lifetime storage

Procedure

APOC Full

apoc.static.set(name, value) - stores value under key for server lifetime storage, returns previously stored or configured value

Procedure

APOC Full

apoc.static.get(name) - returns statically stored value from config (apoc.static.<key>) or server lifetime storage

Function

APOC Full

apoc.static.getAll(prefix) - returns statically stored values from config (apoc.static.<prefix>.*) or server lifetime storage

Function

APOC Full

apoc.stats

Qualified Name Type Release

Procedure

APOC Core

apoc.systemdb

Qualified Name Type Release

Procedure

APOC Full

Procedure

APOC Core

Procedure

APOC Full

apoc.temporal

Qualified Name Type Release

apoc.temporal.format(input, format) | Format a temporal value

Function

APOC Core

apoc.temporal.formatDuration(input, format) | Format a Duration

Function

APOC Core

apoc.temporal.toZonedTemporal('2012-12-23 23:59:59','yyyy-MM-dd HH:mm:ss', 'UTC-hour-offset') parse date string using the specified format to specified timezone

Function

APOC Core

apoc.text

Qualified Name Type Release

apoc.text.doubleMetaphone(value) yield value - Compute the Double Metaphone phonetic encoding of all words of the text value which can be a single string or a list of strings

Procedure

APOC Core

apoc.text.phonetic(value) yield value - Compute the US_ENGLISH phonetic soundex encoding of all words of the text value which can be a single string or a list of strings

Procedure

APOC Core

apoc.text.phoneticDelta(text1, text2) yield phonetic1, phonetic2, delta - Compute the US_ENGLISH soundex character difference between two given strings

Procedure

APOC Core

apoc.text.base64Decode(text) YIELD value - Decode Base64 encoded string

Function

APOC Core

apoc.text.base64Encode(text) YIELD value - Encode a string with Base64

Function

APOC Core

apoc.text.base64UrlDecode(url) YIELD value - Decode Base64 encoded url

Function

APOC Core

apoc.text.base64UrlEncode(text) YIELD value - Encode a url with Base64

Function

APOC Core

apoc.text.byteCount(text,[charset]) - return size of text in bytes

Function

APOC Core

apoc.text.bytes(text,[charset]) - return bytes of the text

Function

APOC Core

apoc.text.camelCase(text) YIELD value - Convert a string to camelCase

Function

APOC Core

apoc.text.capitalize(text) YIELD value - capitalise the first letter of the word

Function

APOC Core

apoc.text.capitalizeAll(text) YIELD value - capitalise the first letter of every word in the text

Function

APOC Core

apoc.text.charAt(text, index) - the decimal value of the character at the given index

Function

APOC Core

apoc.text.clean(text) - strip the given string of everything except alpha numeric characters and convert it to lower case.

Function

APOC Core

apoc.text.code(codepoint) - Returns the unicode character of the given codepoint

Function

APOC Core

apoc.text.compareCleaned(text1, text2) - compare the given strings stripped of everything except alpha numeric characters converted to lower case.

Function

APOC Core

apoc.text.decapitalize(text) YIELD value - decapitalize the first letter of the word

Function

APOC Core

apoc.text.decapitalizeAll(text) YIELD value - decapitalize the first letter of all words

Function

APOC Core

apoc.text.distance(text1, text2) - compare the given strings with the Levenshtein distance algorithm.

Function

APOC Core

apoc.text.doubleMetaphone(value) yield value - Compute the Double Metaphone phonetic encoding of all words of the text value

Function

APOC Core

apoc.text.format(text,[params],language) - sprintf format the string with the params given

Function

APOC Core

apoc.text.fuzzyMatch(text1, text2) - check if 2 words can be matched in a fuzzy way. Depending on the length of the String it will allow more characters that needs to be edited to match the second String.

Function

APOC Core

apoc.text.hammingDistance(text1, text2) - compare the given strings with the Hamming distance algorithm.

Function

APOC Core

apoc.text.hexCharAt(text, index) - the hex value string of the character at the given index

Function

APOC Core

apoc.text.hexValue(value) - the hex value string of the given number

Function

APOC Core

apoc.text.indexOf(text, lookup, from=0, to=-1==len) - find the first occurence of the lookup string in the text, from inclusive, to exclusive, -1 if not found, null if text is null.

Function

APOC Core

apoc.text.indexesOf(text, lookup, from=0, to=-1==len) - finds all occurences of the lookup string in the text, return list, from inclusive, to exclusive, empty list if not found, null if text is null.

Function

APOC Core

apoc.text.jaroWinklerDistance(text1, text2) - compare the given strings with the Jaro-Winkler distance algorithm.

Function

APOC Core

apoc.text.join(['text1','text2',…​], delimiter) - join the given strings with the given delimiter.

Function

APOC Core

apoc.text.levenshteinDistance(text1, text2) - compare the given strings with the Levenshtein distance algorithm.

Function

APOC Core

apoc.text.levenshteinSimilarity(text1, text2) - calculate the similarity (a value within 0 and 1) between two texts.

Function

APOC Core

apoc.text.lpad(text,count,delim) YIELD value - left pad the string to the given width

Function

APOC Core

apoc.text.phonetic(text) yield value - Compute the US_ENGLISH phonetic soundex encoding of all words of the text

Function

APOC Core

apoc.text.random(length, valid) YIELD value - generate a random string

Function

APOC Core

apoc.text.regexGroups(text, regex) - return all matching groups of the regex on the given text.

Function

APOC Core

apoc.text.regreplace(text, regex, replacement) - replace each substring of the given string that matches the given regular expression with the given replacement.

Function

APOC Core

apoc.text.repeat(item, count) - string multiplication

Function

APOC Core

apoc.text.replace(text, regex, replacement) - replace each substring of the given string that matches the given regular expression with the given replacement.

Function

APOC Core

apoc.text.rpad(text,count,delim) YIELD value - right pad the string to the given width

Function

APOC Core

apoc.text.slug(text, delim) - slug the text with the given delimiter

Function

APOC Core

apoc.text.snakeCase(text) YIELD value - Convert a string to snake-case

Function

APOC Core

apoc.text.sorensenDiceSimilarityWithLanguage(text1, text2, languageTag) - compare the given strings with the Sørensen–Dice coefficient formula, with the provided IETF language tag

Function

APOC Core

apoc.text.split(text, regex, limit) - splits the given text around matches of the given regex.

Function

APOC Core

apoc.text.swapCase(text) YIELD value - Swap the case of a string

Function

APOC Core

apoc.text.toCypher(value, {skipKeys,keepKeys,skipValues,keepValues,skipNull,node,relationship,start,end}) | tries it’s best to convert the value to a cypher-property-string

Function

APOC Core

apoc.text.toUpperCase(text) YIELD value - Convert a string to UPPER_CASE

Function

APOC Core

apoc.text.upperCamelCase(text) YIELD value - Convert a string to camelCase

Function

APOC Core

apoc.text.urldecode(text) - return the urldecoded text

Function

APOC Core

apoc.text.urlencode(text) - return the urlencoded text

Function

APOC Core

apoc.trigger

Qualified Name Type Release

add a trigger kernelTransaction under a name, in the kernelTransaction you can use {createdNodes}, {deletedNodes} etc., the selector is {phase:'before/after/rollback'} returns previous and new trigger information. Takes in an optional configuration.

Procedure

APOC Core

list all installed triggers

Procedure

APOC Core

CALL apoc.trigger.pause(name) | it pauses the trigger

Procedure

APOC Core

remove previously added trigger, returns trigger information

Procedure

APOC Core

removes all previously added trigger, returns trigger information

Procedure

APOC Core

CALL apoc.trigger.resume(name) | it resumes the paused trigger

Procedure

APOC Core

Function

APOC Full

Function

APOC Full

apoc.ttl

Qualified Name Type Release

CALL apoc.ttl.expire(node,time,'time-unit') - expire node at specified time by setting :TTL label and ttl property

Procedure

APOC Full

CALL apoc.ttl.expireIn(node,timeDelta,'time-unit') - expire node after specified length of time time by setting :TTL label and ttl property

Procedure

APOC Full

Function

APOC Full

apoc.util

Qualified Name Type Release

apoc.util.sleep(<duration>) | sleeps for <duration> millis, transaction termination is honored

Procedure

APOC Core

apoc.util.validate(predicate, message, params) | if the predicate yields to true raise an exception

Procedure

APOC Core

apoc.util.compress(string, {config}) | return a compressed byte[] in various format from a string

Function

APOC Core

apoc.util.decompress(compressed, {config}) | return a string from a compressed byte[] in various format

Function

APOC Core

apoc.util.md5([values]) | computes the md5 of the concatenation of all string values of the list. Unsuitable for cryptographic use-cases.

Function

APOC Core

apoc.util.sha1([values]) | computes the sha1 of the concatenation of all string values of the list

Function

APOC Core

apoc.util.sha256([values]) | computes the sha256 of the concatenation of all string values of the list

Function

APOC Core

apoc.util.sha384([values]) | computes the sha384 of the concatenation of all string values of the list

Function

APOC Core

apoc.util.sha512([values]) | computes the sha512 of the concatenation of all string values of the list

Function

APOC Core

apoc.util.validatePredicate(predicate, message, params) | if the predicate yields to true raise an exception else returns true, for use inside WHERE subclauses

Function

APOC Core

apoc.uuid

Qualified Name Type Release

CALL apoc.uuid.install(label, {addToExistingNodes: true/false, uuidProperty: 'uuid'}) yield label, installed, properties, batchComputationResult | it will add the uuid transaction handler for the provided label and uuidProperty, in case the UUID handler is already present it will be replaced by the new one

Procedure

APOC Full

CALL apoc.uuid.list() yield label, installed, properties | provides a list of all the uuid handlers installed with the related configuration

Procedure

APOC Full

CALL apoc.uuid.remove(label) yield label, installed, properties | remove previously added uuid handler and returns uuid information. All the existing uuid properties are left as-is

Procedure

APOC Full

CALL apoc.uuid.removeAll() yield label, installed, properties | it removes all previously added uuid handlers and returns uuids information. All the existing uuid properties are left as-is

Procedure

APOC Full

apoc.warmup

Qualified Name Type Release

apoc.warmup.run(loadProperties=false,loadDynamicProperties=false,loadIndexes=false) - quickly loads all nodes and rels into memory by skipping one page at a time

Procedure

APOC Core

apoc.xml

Qualified Name Type Release

Deprecated by apoc.import.xml

Procedure

APOC Core

RETURN apoc.xml.parse(<xml string>, <xPath string>, config, false) AS value

Function

APOC Core