Skip to main content

Procedures

Procedures are functions that can be called from within Cypher queries using the CALL syntax.

Syntax

Basic procedure call:

GRAPH.QUERY social "CALL db.labels()"

With explicit YIELD to select specific return values:

GRAPH.QUERY social "CALL db.labels() YIELD label"

Note: The YIELD clause is optional. When omitted, all values listed in the 'Yields' column are returned automatically.

Available Procedures

ProcedureArgumentsYieldsDescription
db.labelsnonelabelYields all node labels in the graph.
db.relationshipTypesnonerelationshipTypeYields all relationship types in the graph.
db.propertyKeysnonepropertyKeyYields all property keys in the graph.
db.meta.statsnonelabels, relTypes, relCount, nodeCount, labelCount, relTypeCount, propertyKeyCountYield comprehensive graph statistics including maps of labels and relationship types with their counts, total node/relationship counts, and schema metadata counts.
db.indexesnonelabel, properties, types, options, language, stopwords, entitytype, status, infoYield all indexes in the graph, denoting whether they are of the type of exact-match ("RANGE"), full-text ("FULLTEXT") or vector ("VECTOR") and which label and properties each covers and whether they are indexing node or relationship attributes.
db.constraintsnonetype, label, properties, entitytype, statusYield all constraints in the graph, denoting constraint type (UNIQIE/MANDATORY), which label/relationship-type and properties each enforces.
db.idx.fulltext.createNodeIndexlabel, property [, property ...]noneBuilds a full-text searchable index on a label and the 1 or more specified properties.
db.idx.fulltext.droplabelnoneDeletes the full-text index associated with the given label.
db.idx.fulltext.queryNodeslabel, stringnode, scoreRetrieve all nodes that contain the specified string in the full-text indexes on the given label.
db.idx.fulltext.queryRelationshipsrelationshipType, stringrelationship, scoreRetrieve all relationships that contain the specified string in the full-text indexes on the given relationship type. See Full-Text Indexing for details.
db.idx.vector.queryNodeslabel, attribute, k, querynode, scoreRetrieve up to k nodes with vectors most similar to the query vector using the specified label and attribute. See Vector Indexing for details.
db.idx.vector.queryRelationshipsrelationshipType, attribute, k, queryrelationship, scoreRetrieve up to k relationships with vectors most similar to the query vector using the specified relationship type and attribute. See Vector Indexing for details.
algo.pageRanklabel, relationship-typenode, scoreRuns the pagerank algorithm over nodes of given label, considering only edges of given relationship type.
algo.BFSsource-node, max-level, relationship-typenodes, edgesPerforms BFS to find all nodes connected to the source. A max level of 0 indicates unlimited and a non-NULL relationship-type defines the relationship type that may be traversed. See BFS Algorithm for details.
algo.MSFconfigsrc, dest, weight, relationshipTypeComputes the Minimum Spanning Forest of the graph. See MSF Algorithm for details.
dbms.procedures()nonename, modeList all procedures in the DBMS, yields for every procedure its name and mode (read/write).