From 86ce33f7ea8e32e0a7fef232824ee7a694d68387 Mon Sep 17 00:00:00 2001 From: Marko Budiselic Date: Thu, 16 Jul 2026 20:35:48 +0200 Subject: [PATCH 1/9] Add Memgraph v3.13.0 --- pages/release-notes.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/release-notes.mdx b/pages/release-notes.mdx index 0cf175471..e12028e7e 100644 --- a/pages/release-notes.mdx +++ b/pages/release-notes.mdx @@ -46,6 +46,14 @@ guide. ## 🚀 Latest release +### Memgraph v3.13.0 - September 9th, 2026 + +### Lab v3.13.0 - September 9th, 2026 + + + +## Previous releases + ### Memgraph v3.12.0 - July 15th, 2026 {

⚠️ Breaking changes

} @@ -196,8 +204,6 @@ guide. -## Previous releases - ### Memgraph v3.11.0 - June 17th, 2026 {

⚠️ Breaking changes

} From c87ada73ab2125473b908e8a0a1d0990167d98b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:06:05 +0200 Subject: [PATCH 2/9] docs: support RANGE keyword in CREATE INDEX ... FOR syntax (#1702) * docs: document RANGE keyword in CREATE INDEX ... FOR syntax * docs: drop unnecessary note about RANGE with native ON syntax --- pages/querying/differences-in-cypher-implementations.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pages/querying/differences-in-cypher-implementations.mdx b/pages/querying/differences-in-cypher-implementations.mdx index 687f1a700..48df4b6c1 100644 --- a/pages/querying/differences-in-cypher-implementations.mdx +++ b/pages/querying/differences-in-cypher-implementations.mdx @@ -34,6 +34,15 @@ CREATE INDEX FOR (n:Person) ON (n.age, n.country); CREATE INDEX FOR ()-[r:KNOWS]-() ON (r.since); ``` +The optional `RANGE` keyword is also accepted in the `FOR ... ON` syntax, for both nodes and relationships: + +```cypher +CREATE RANGE INDEX FOR (n:Person) ON (n.surname); +CREATE RANGE INDEX FOR ()-[r:KNOWS]-() ON (r.since); +``` + +Neo4j's `RANGE` index is its general-purpose ordered property index, used for equality, range and prefix lookups — the same role Memgraph's label-property and edge-type property indexes already fill. `RANGE` is therefore accepted as a synonym: it maps onto the existing index with no new index type and no change in behavior. + The native Memgraph syntax remains supported as well: ```cypher From e80149619c687177eb947d1d03167cb517cec804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:20:26 +0200 Subject: [PATCH 3/9] docs: add map.get and map.merge_list; align map functions on null/coercion behavior (#1696) * docs: document map.get and map.merge_list, and map null/coercion behavior * docs: note node/relationship coercion for map.remove_key, remove_keys, flatten * docs: mark map.set_key value argument as nullable --- .../available-algorithms/map.mdx | 103 ++++++++++++++++-- 1 file changed, 92 insertions(+), 11 deletions(-) diff --git a/pages/advanced-algorithms/available-algorithms/map.mdx b/pages/advanced-algorithms/available-algorithms/map.mdx index 320171d59..659613b83 100644 --- a/pages/advanced-algorithms/available-algorithms/map.mdx +++ b/pages/advanced-algorithms/available-algorithms/map.mdx @@ -40,7 +40,7 @@ from any inner maps that are part of the input map. {

Input:

} -- `map: Map` ➡ The map from which the key will be removed. +- `map: Map` ➡ The map from which the key will be removed (a node or relationship may be passed; its properties are used). - `key: string` ➡ The key to be removed from the map. - `config: Map default = {recursive: false}` ➡ The config map which supports the `recursive` option. The option `recursive` is `false` by default, and should be @@ -94,7 +94,7 @@ This function is equivalent to **apoc.map.removeKeys**. {

Input:

} -- `map: Map[Any]` ➡ The input map. +- `map: Map[Any]` ➡ The input map (a node or relationship may be passed; its properties are used). - `keys: List[string]` ➡ A list of keys that will be removed. - `config: Map default = {recursive: false}` ➡ A config map which supports the `recursive` option. The `recursive` option is `false` by default, and should be @@ -181,8 +181,8 @@ This function is equivalent to **apoc.map.merge**. {

Input:

} -- `first: mgp.Nullable[Map]` ➡ A map containing key-value pairs that need to be merged with another map. -- `second: mgp.Nullable[Map]` ➡ The second map containing key-value pairs that need to be merged with the key-values from the first map. +- `map1: mgp.Nullable[Map]` ➡ The first map to merge (a node or relationship may be passed; its properties are used). +- `map2: mgp.Nullable[Map]` ➡ The second map to merge. On a key conflict, its value takes precedence. {

Output:

} @@ -204,13 +204,47 @@ RETURN map.merge({a: "b", c: "d"}, {e: "f", g: "h"}) AS merged; +----------------------------------------+ ``` +### `merge_list()` + +Merges a list of maps into a single map. Keys are merged left to right, so when +the same key appears in more than one map, the value from the last map wins. An +empty list yields an empty map. + + +This function is equivalent to **apoc.map.mergeList**. + + +{

Input:

} + +- `maps: List[Map]` ➡ The maps to merge (each element may be a node or relationship, whose properties are used). + +{

Output:

} + +- `Map` ➡ The merged map. + +{

Usage:

} + +The following query merges a list of maps: + +```cypher +RETURN map.merge_list([{a: 1}, {a: 2, b: 3}]) AS merged; +``` + +```plaintext ++----------------------------------------+ +| merged | ++----------------------------------------+ +| {a: 2, b: 3} | ++----------------------------------------+ +``` + ### `flatten()` The procedure flattens nested items in the input map. {

Input:

} -- `map: Map[Any]` ➡ The input map that needs to be modified. +- `map: Map[Any]` ➡ The input map that needs to be modified (a node or relationship may be passed; its properties are used). - `delimiter: string (default = ".")` ➡ The delimiter used for flattening. {

Output:

} @@ -270,8 +304,12 @@ RETURN map.from_lists(["key","key2"],[1,2]) AS result; ### `from_values()` Returns a map from the given list of values. The list has the format: `[key1, -value1, key2, value2]`. If the key is not convertible to a string, the function -throws `ValueException`. +value1, key2, value2]`. Keys are converted to strings; a pair whose key is +`null` is skipped (its value is ignored). + + +This function is equivalent to **apoc.map.fromValues**. + {

Input:

} @@ -300,13 +338,18 @@ RETURN map.from_values(["day", "sunny", 5, 6]) AS map; ### `set_key()` Updates the value at the position `key` in a map. If the key doesn't exist, -the function will insert it. +the function will insert it. A `null` map is treated as empty and a `null` key +is a no-op (the map is returned unchanged). + + +This function is equivalent to **apoc.map.setKey**. + {

Input:

} -- `map: Map` ➡ The map that will be modified. -- `key: string` ➡ The key of a certain key-value pair that needs to have a new value. -- `value: any` ➡ The new value of a certain key-value pair. +- `map: mgp.Nullable[Map]` ➡ The map that will be modified (a node or relationship may be passed; its properties are used). +- `key: mgp.Nullable[string]` ➡ The key to add or update; a `null` key leaves the map unchanged. +- `value: mgp.Nullable[Any]` ➡ The new value of the key-value pair. {

Output:

} @@ -328,6 +371,44 @@ RETURN map.set_key({name:"Ivan",country:"Croatia"}, "name", "Matija") AS map; +-------------------------------------------+ ``` +### `get()` + +Returns the value stored under `key` in the map. If the key is absent, the +function returns `value` when it is non-null; otherwise it throws when `fail` is +`true` (the default) or returns `null` when `fail` is `false`. An existing key +always wins, even when its stored value is `null`. + + +This function is equivalent to **apoc.map.get**. + + +{

Input:

} + +- `map: Map` ➡ The map to look up (a node or relationship may be passed; its properties are used). +- `key: string` ➡ The key to look up. +- `value: any (default = null)` ➡ The value returned when the key is absent. +- `fail: boolean (default = true)` ➡ When `true`, throws if the key is absent and `value` is null; when `false`, returns `null` instead. + +{

Output:

} + +- `any` ➡ The value at `key`, the fallback `value`, or `null`. + +{

Usage:

} + +The following query returns the fallback value because the key is absent: + +```cypher +RETURN map.get({name: "Ivan"}, "country", "unknown", false) AS value; +``` + +```plaintext ++----------------------------------------+ +| value | ++----------------------------------------+ +| "unknown" | ++----------------------------------------+ +``` + ## Procedures ### `from_nodes()` From 24e8e8a27b218a8480ea27c054ef5a0b1edaa96b Mon Sep 17 00:00:00 2001 From: Dr Matt James Date: Tue, 28 Jul 2026 15:20:57 +0100 Subject: [PATCH 4/9] refactor: build and package MAGE from the unified CMake tree (#1700) * refactor: build and package MAGE from the unified CMake tree * update page --- pages/advanced-algorithms.mdx | 2 +- .../available-algorithms.mdx | 2 +- .../available-algorithms/algo.mdx | 2 +- .../betweenness_centrality.mdx | 2 +- .../betweenness_centrality_online.mdx | 2 +- .../biconnected_components.mdx | 2 +- .../bipartite_matching.mdx | 2 +- .../available-algorithms/bridges.mdx | 2 +- .../available-algorithms/collections.mdx | 2 +- .../community_detection.mdx | 2 +- .../available-algorithms/create.mdx | 2 +- .../available-algorithms/cross_database.mdx | 2 +- .../available-algorithms/csv_utils.mdx | 2 +- .../available-algorithms/cugraph.mdx | 2 +- .../available-algorithms/cycles.mdx | 2 +- .../degree_centrality.mdx | 2 +- .../distance_calculator.mdx | 2 +- .../available-algorithms/do.mdx | 2 +- .../elasticsearch_synchronization.mdx | 2 +- .../available-algorithms/embeddings.mdx | 2 +- .../available-algorithms/export_util.mdx | 2 +- .../available-algorithms/gnn.mdx | 2 +- .../gnn_link_prediction.mdx | 4 +- .../gnn_node_classification.mdx | 2 +- .../available-algorithms/graph_coloring.mdx | 2 +- .../available-algorithms/graph_util.mdx | 2 +- .../available-algorithms/igraphalg.mdx | 2 +- .../available-algorithms/import_util.mdx | 2 +- .../available-algorithms/json_util.mdx | 2 +- .../available-algorithms/katz_centrality.mdx | 2 +- .../kmeans_clustering.mdx | 2 +- .../available-algorithms/knn.mdx | 2 +- .../available-algorithms/label.mdx | 2 +- .../leiden_community_detection.mdx | 2 +- .../available-algorithms/llm_util.mdx | 2 +- .../available-algorithms/map.mdx | 2 +- .../available-algorithms/math.mdx | 2 +- .../available-algorithms/max_flow.mdx | 2 +- .../available-algorithms/merge.mdx | 2 +- .../available-algorithms/meta.mdx | 2 +- .../available-algorithms/meta_util.mdx | 2 +- .../available-algorithms/neighbors.mdx | 2 +- .../available-algorithms/node.mdx | 2 +- .../available-algorithms/node2vec.mdx | 2 +- .../available-algorithms/node_similarity.mdx | 2 +- .../available-algorithms/nodes.mdx | 2 +- .../available-algorithms/pagerank.mdx | 2 +- .../available-algorithms/path.mdx | 2 +- .../available-algorithms/periodic.mdx | 2 +- .../available-algorithms/refactor.mdx | 2 +- .../available-algorithms/set_cover.mdx | 2 +- .../available-algorithms/set_property.mdx | 2 +- .../available-algorithms/temporal.mdx | 2 +- .../available-algorithms/text.mdx | 2 +- .../available-algorithms/tgn.mdx | 2 +- .../available-algorithms/tsp.mdx | 2 +- .../available-algorithms/union_find.mdx | 2 +- .../available-algorithms/util_module.mdx | 2 +- .../available-algorithms/uuid_generator.mdx | 2 +- .../available-algorithms/vrp.mdx | 2 +- .../weakly_connected_components.mdx | 2 +- .../available-algorithms/xml_module.mdx | 2 +- pages/advanced-algorithms/install-mage.mdx | 117 +++++++---------- pages/custom-query-modules.mdx | 122 ++++++------------ pages/custom-query-modules/contributing.mdx | 2 +- .../custom-query-modules/cpp/cpp-example.mdx | 2 +- pages/getting-started/packaging-memgraph.mdx | 42 +++++- 67 files changed, 185 insertions(+), 226 deletions(-) diff --git a/pages/advanced-algorithms.mdx b/pages/advanced-algorithms.mdx index 34abb89c3..d755ec38e 100644 --- a/pages/advanced-algorithms.mdx +++ b/pages/advanced-algorithms.mdx @@ -30,7 +30,7 @@ Dynamic graph algorithms are a part of [Memgraph Enterprise license](/database-management/enabling-memgraph-enterprise). For more algorithms, check the **Memgraph Advanced Graph Extensions** (**MAGE**) -library. It is part of the [Memgraph GitHub repository](https://github.com/memgraph/memgraph/tree/master/mage) +library. It is part of the [Memgraph GitHub repository](https://github.com/memgraph/memgraph/tree/master/src/mage) that contains [graph algorithms](/advanced-algorithms/available-algorithms) written by the team behind Memgraph and its users in the form of query modules. The project aims to give everyone the tools they need to tackle the most diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index 749aa1ea2..b6e6dc234 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -111,7 +111,7 @@ If you want to know more and learn how this affects you, read our [announcement] | [nodes](/advanced-algorithms/available-algorithms/nodes) | C++ | A module that provides a comprehensive toolkit for managing multiple graph nodes, enabling linking, updating, type deduction and more. | | [periodic](/advanced-algorithms/available-algorithms/periodic) | C++ | A module containing procedures for periodically running difficult and/or memory/time consuming queries. | | [refactor](/advanced-algorithms/available-algorithms/refactor) | C++ | The refactor module provides utilities for changing nodes and relationships. | -| [rust_example](https://github.com/memgraph/memgraph/tree/master/mage/rust/rsmgp-example) | Rust | Example of a basic module with input parameters forwarding, made in Rust. | +| [rust_example](https://github.com/memgraph/memgraph/tree/master/src/mage/rust/rsmgp-example) | Rust | Example of a basic module with input parameters forwarding, made in Rust. | | [set_property](/advanced-algorithms/available-algorithms/set_property) | C++ | A module for dynamical access and editing of node and relationship properties. | | [temporal](/advanced-algorithms/available-algorithms/temporal) | Python | A module that provides functions to handle temporal (time-related) operations and offers extended capabilities compared to the date module. | | [text](/advanced-algorithms/available-algorithms/text) | C++ | The `text` module offers a toolkit for manipulating strings. | diff --git a/pages/advanced-algorithms/available-algorithms/algo.mdx b/pages/advanced-algorithms/available-algorithms/algo.mdx index 16d6a13ec..c3d418b04 100644 --- a/pages/advanced-algorithms/available-algorithms/algo.mdx +++ b/pages/advanced-algorithms/available-algorithms/algo.mdx @@ -16,7 +16,7 @@ enabling users to perform complex graph-based operations and computations, such } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/algo_module/algo_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/algo_module/algo_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/betweenness_centrality.mdx b/pages/advanced-algorithms/available-algorithms/betweenness_centrality.mdx index 43f92557a..7383b0062 100644 --- a/pages/advanced-algorithms/available-algorithms/betweenness_centrality.mdx +++ b/pages/advanced-algorithms/available-algorithms/betweenness_centrality.mdx @@ -28,7 +28,7 @@ Centrality"](http://www.uvm.edu/pdodds/research/papers/others/2001/brandes2001a. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/betweenness_centrality_module/betweenness_centrality_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/betweenness_centrality_module/betweenness_centrality_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/betweenness_centrality_online.mdx b/pages/advanced-algorithms/available-algorithms/betweenness_centrality_online.mdx index 3d7ed9507..09f0b3654 100644 --- a/pages/advanced-algorithms/available-algorithms/betweenness_centrality_online.mdx +++ b/pages/advanced-algorithms/available-algorithms/betweenness_centrality_online.mdx @@ -48,7 +48,7 @@ reflective of real-time changes. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/betweenness_centrality_module/betweenness_centrality_online_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/betweenness_centrality_module/betweenness_centrality_online_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/biconnected_components.mdx b/pages/advanced-algorithms/available-algorithms/biconnected_components.mdx index a50fd6915..2144fd3a6 100644 --- a/pages/advanced-algorithms/available-algorithms/biconnected_components.mdx +++ b/pages/advanced-algorithms/available-algorithms/biconnected_components.mdx @@ -21,7 +21,7 @@ The algorithm works by finding articulation points, and then traversing from the } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/biconnected_components_module/biconnected_components_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/biconnected_components_module/biconnected_components_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/bipartite_matching.mdx b/pages/advanced-algorithms/available-algorithms/bipartite_matching.mdx index 9532fee59..84ed70d80 100644 --- a/pages/advanced-algorithms/available-algorithms/bipartite_matching.mdx +++ b/pages/advanced-algorithms/available-algorithms/bipartite_matching.mdx @@ -23,7 +23,7 @@ set of edges (relationships). } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/bipartite_matching_module/bipartite_matching_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/bipartite_matching_module/bipartite_matching_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/bridges.mdx b/pages/advanced-algorithms/available-algorithms/bridges.mdx index 1bf17867e..459ab30fb 100644 --- a/pages/advanced-algorithms/available-algorithms/bridges.mdx +++ b/pages/advanced-algorithms/available-algorithms/bridges.mdx @@ -20,7 +20,7 @@ valuable to detect it on time. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/bridges_module/bridges_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/bridges_module/bridges_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/collections.mdx b/pages/advanced-algorithms/available-algorithms/collections.mdx index 339874be6..4c6c7920c 100644 --- a/pages/advanced-algorithms/available-algorithms/collections.mdx +++ b/pages/advanced-algorithms/available-algorithms/collections.mdx @@ -20,7 +20,7 @@ using the `CALL` subclause. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/collections_module/collections_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/collections_module/collections_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/community_detection.mdx b/pages/advanced-algorithms/available-algorithms/community_detection.mdx index 51144ea3b..ed6cdc5c2 100644 --- a/pages/advanced-algorithms/available-algorithms/community_detection.mdx +++ b/pages/advanced-algorithms/available-algorithms/community_detection.mdx @@ -32,7 +32,7 @@ preserving communities. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/community_detection_module/community_detection_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/community_detection_module/community_detection_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/create.mdx b/pages/advanced-algorithms/available-algorithms/create.mdx index cebc0f5aa..31f4f4bef 100644 --- a/pages/advanced-algorithms/available-algorithms/create.mdx +++ b/pages/advanced-algorithms/available-algorithms/create.mdx @@ -17,7 +17,7 @@ model, manipulate, and query complex graph data. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/create_module/create_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/create_module/create_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/cross_database.mdx b/pages/advanced-algorithms/available-algorithms/cross_database.mdx index 1856d6704..00f462f3a 100644 --- a/pages/advanced-algorithms/available-algorithms/cross_database.mdx +++ b/pages/advanced-algorithms/available-algorithms/cross_database.mdx @@ -24,7 +24,7 @@ procedure has been replaced by the more general [`cross_database.bolt()`](#bolt) } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/cross_database.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/cross_database.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/csv_utils.mdx b/pages/advanced-algorithms/available-algorithms/csv_utils.mdx index 1c1e91f0c..03afe001c 100644 --- a/pages/advanced-algorithms/available-algorithms/csv_utils.mdx +++ b/pages/advanced-algorithms/available-algorithms/csv_utils.mdx @@ -16,7 +16,7 @@ It allows users to create and delete CSV files directly from the database enviro } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/csv_utils_module/csv_utils_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/csv_utils_module/csv_utils_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/cugraph.mdx b/pages/advanced-algorithms/available-algorithms/cugraph.mdx index c63ba24ac..05a324041 100644 --- a/pages/advanced-algorithms/available-algorithms/cugraph.mdx +++ b/pages/advanced-algorithms/available-algorithms/cugraph.mdx @@ -23,7 +23,7 @@ wrappers for most of the algorithms present in the } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/cugraph_module" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/cugraph_module" /> diff --git a/pages/advanced-algorithms/available-algorithms/cycles.mdx b/pages/advanced-algorithms/available-algorithms/cycles.mdx index 6da8bbe66..b853583dc 100644 --- a/pages/advanced-algorithms/available-algorithms/cycles.mdx +++ b/pages/advanced-algorithms/available-algorithms/cycles.mdx @@ -26,7 +26,7 @@ set of nodes (vertices) of the given graph. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/cycles_module/cycles_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/cycles_module/cycles_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/degree_centrality.mdx b/pages/advanced-algorithms/available-algorithms/degree_centrality.mdx index 308b0252d..bbc62f4ff 100644 --- a/pages/advanced-algorithms/available-algorithms/degree_centrality.mdx +++ b/pages/advanced-algorithms/available-algorithms/degree_centrality.mdx @@ -25,7 +25,7 @@ a_{i,k}$ or in matrix form: $y = A 1$. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/degree_centrality_module/degree_centrality_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/degree_centrality_module/degree_centrality_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/distance_calculator.mdx b/pages/advanced-algorithms/available-algorithms/distance_calculator.mdx index 3e086203c..22ee28cd6 100644 --- a/pages/advanced-algorithms/available-algorithms/distance_calculator.mdx +++ b/pages/advanced-algorithms/available-algorithms/distance_calculator.mdx @@ -24,7 +24,7 @@ this: } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/distance_calculator/distance_calculator.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/distance_calculator/distance_calculator.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/do.mdx b/pages/advanced-algorithms/available-algorithms/do.mdx index e3ec392e8..cad9f2925 100644 --- a/pages/advanced-algorithms/available-algorithms/do.mdx +++ b/pages/advanced-algorithms/available-algorithms/do.mdx @@ -18,7 +18,7 @@ that will control query execution. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/do_module/do_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/do_module/do_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/elasticsearch_synchronization.mdx b/pages/advanced-algorithms/available-algorithms/elasticsearch_synchronization.mdx index f1d6b68a4..a72fd2927 100644 --- a/pages/advanced-algorithms/available-algorithms/elasticsearch_synchronization.mdx +++ b/pages/advanced-algorithms/available-algorithms/elasticsearch_synchronization.mdx @@ -49,7 +49,7 @@ create new ones with custom schema**. Indexing can be performed in two ways: } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/elastic_search_serialization.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/elastic_search_serialization.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/embeddings.mdx b/pages/advanced-algorithms/available-algorithms/embeddings.mdx index c7360ad43..b1034c9c7 100644 --- a/pages/advanced-algorithms/available-algorithms/embeddings.mdx +++ b/pages/advanced-algorithms/available-algorithms/embeddings.mdx @@ -27,7 +27,7 @@ credentials. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/embeddings.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/embeddings.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/export_util.mdx b/pages/advanced-algorithms/available-algorithms/export_util.mdx index 9b9feee57..961be5b4d 100644 --- a/pages/advanced-algorithms/available-algorithms/export_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/export_util.mdx @@ -24,7 +24,7 @@ Currently, this module supports: } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/export_util.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/export_util.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/gnn.mdx b/pages/advanced-algorithms/available-algorithms/gnn.mdx index e1341f698..5278db274 100644 --- a/pages/advanced-algorithms/available-algorithms/gnn.mdx +++ b/pages/advanced-algorithms/available-algorithms/gnn.mdx @@ -29,7 +29,7 @@ Typical workflow: } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/gnn.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/gnn.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/gnn_link_prediction.mdx b/pages/advanced-algorithms/available-algorithms/gnn_link_prediction.mdx index 07c29dcb5..dc40f9907 100644 --- a/pages/advanced-algorithms/available-algorithms/gnn_link_prediction.mdx +++ b/pages/advanced-algorithms/available-algorithms/gnn_link_prediction.mdx @@ -32,7 +32,7 @@ representations by aggregating the representations of node neighbors and their representation from the previous iteration. Such properties make **graph neural networks** a great tool for various problems we in Memgraph encounter. If your graph is evolving in time, check [TGN -model](https://github.com/memgraph/memgraph/blob/master/mage/python/tgn.py) that Memgraph +model](https://github.com/memgraph/memgraph/blob/master/src/mage/python/tgn.py) that Memgraph engineers have already developed. In this includes the following features: @@ -92,7 +92,7 @@ For the underlying **GNN** training Memgraph uses the [DGL library](https://gith } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/link_prediction.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/link_prediction.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/gnn_node_classification.mdx b/pages/advanced-algorithms/available-algorithms/gnn_node_classification.mdx index f1e7fcb8d..9af741596 100644 --- a/pages/advanced-algorithms/available-algorithms/gnn_node_classification.mdx +++ b/pages/advanced-algorithms/available-algorithms/gnn_node_classification.mdx @@ -45,7 +45,7 @@ useful. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/node_classification.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/node_classification.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/graph_coloring.mdx b/pages/advanced-algorithms/available-algorithms/graph_coloring.mdx index 0888f2c51..faff998ef 100644 --- a/pages/advanced-algorithms/available-algorithms/graph_coloring.mdx +++ b/pages/advanced-algorithms/available-algorithms/graph_coloring.mdx @@ -40,7 +40,7 @@ converging to local minimums too early. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/graph_coloring.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/graph_coloring.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/graph_util.mdx b/pages/advanced-algorithms/available-algorithms/graph_util.mdx index 43cc207a4..5f12ffddb 100644 --- a/pages/advanced-algorithms/available-algorithms/graph_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/graph_util.mdx @@ -18,7 +18,7 @@ manipulation tools to accelerate development. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/graph_util_module/graph_util_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/graph_util_module/graph_util_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/igraphalg.mdx b/pages/advanced-algorithms/available-algorithms/igraphalg.mdx index 47b62a7ec..7a5d734fa 100644 --- a/pages/advanced-algorithms/available-algorithms/igraphalg.mdx +++ b/pages/advanced-algorithms/available-algorithms/igraphalg.mdx @@ -18,7 +18,7 @@ stream the native database graph directly, significantly lowering memory usage. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/igraphalg.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/igraphalg.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/import_util.mdx b/pages/advanced-algorithms/available-algorithms/import_util.mdx index 04bcc81d5..b6f16e1a4 100644 --- a/pages/advanced-algorithms/available-algorithms/import_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/import_util.mdx @@ -18,7 +18,7 @@ supports the import of JSON and graphML file formats. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/import_util.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/import_util.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/json_util.mdx b/pages/advanced-algorithms/available-algorithms/json_util.mdx index 4a01a1600..2b77d21de 100644 --- a/pages/advanced-algorithms/available-algorithms/json_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/json_util.mdx @@ -18,7 +18,7 @@ and if it is a map, the module loads it as a single value. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/json_util.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/json_util.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/katz_centrality.mdx b/pages/advanced-algorithms/available-algorithms/katz_centrality.mdx index fc9174b61..c336b2804 100644 --- a/pages/advanced-algorithms/available-algorithms/katz_centrality.mdx +++ b/pages/advanced-algorithms/available-algorithms/katz_centrality.mdx @@ -38,7 +38,7 @@ resulting centralities will be correct. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/katz_centrality_module/katz_centrality_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/katz_centrality_module/katz_centrality_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/kmeans_clustering.mdx b/pages/advanced-algorithms/available-algorithms/kmeans_clustering.mdx index 25b7abd4e..ca50792d7 100644 --- a/pages/advanced-algorithms/available-algorithms/kmeans_clustering.mdx +++ b/pages/advanced-algorithms/available-algorithms/kmeans_clustering.mdx @@ -18,7 +18,7 @@ sum-of-squares. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/kmeans.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/kmeans.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/knn.mdx b/pages/advanced-algorithms/available-algorithms/knn.mdx index b71dde9a8..9c228f1a4 100644 --- a/pages/advanced-algorithms/available-algorithms/knn.mdx +++ b/pages/advanced-algorithms/available-algorithms/knn.mdx @@ -23,7 +23,7 @@ finding nodes with similar embeddings, features, or other vector-based propertie } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/knn_module/knn_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/knn_module/knn_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/label.mdx b/pages/advanced-algorithms/available-algorithms/label.mdx index 8da9d0b8a..73327f563 100644 --- a/pages/advanced-algorithms/available-algorithms/label.mdx +++ b/pages/advanced-algorithms/available-algorithms/label.mdx @@ -17,7 +17,7 @@ to check the existence of a label within the node. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/label_module/label_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/label_module/label_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/leiden_community_detection.mdx b/pages/advanced-algorithms/available-algorithms/leiden_community_detection.mdx index 3fbd31a39..bc6655d3d 100644 --- a/pages/advanced-algorithms/available-algorithms/leiden_community_detection.mdx +++ b/pages/advanced-algorithms/available-algorithms/leiden_community_detection.mdx @@ -32,7 +32,7 @@ space complexity if $\mathcal{O}(VE)$ for $V$ nodes and $E$ edges. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/leiden_community_detection_module/leiden_community_detection_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/leiden_community_detection_module/leiden_community_detection_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/llm_util.mdx b/pages/advanced-algorithms/available-algorithms/llm_util.mdx index fb3add1bc..5fdf93d5e 100644 --- a/pages/advanced-algorithms/available-algorithms/llm_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/llm_util.mdx @@ -26,7 +26,7 @@ developing applications powered by language models. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/llm_util.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/llm_util.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/map.mdx b/pages/advanced-algorithms/available-algorithms/map.mdx index 659613b83..e3cfc5995 100644 --- a/pages/advanced-algorithms/available-algorithms/map.mdx +++ b/pages/advanced-algorithms/available-algorithms/map.mdx @@ -17,7 +17,7 @@ context. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/map_module/map_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/map_module/map_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/math.mdx b/pages/advanced-algorithms/available-algorithms/math.mdx index 85e0ff78b..2ac659a11 100644 --- a/pages/advanced-algorithms/available-algorithms/math.mdx +++ b/pages/advanced-algorithms/available-algorithms/math.mdx @@ -15,7 +15,7 @@ The `math` module provides essential mathematical operations for precise numeric } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/math_module/math_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/math_module/math_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/max_flow.mdx b/pages/advanced-algorithms/available-algorithms/max_flow.mdx index e3595fbd9..26870030d 100644 --- a/pages/advanced-algorithms/available-algorithms/max_flow.mdx +++ b/pages/advanced-algorithms/available-algorithms/max_flow.mdx @@ -37,7 +37,7 @@ returning max flow value is 0. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/max_flow.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/max_flow.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/merge.mdx b/pages/advanced-algorithms/available-algorithms/merge.mdx index 7abdc1554..df5cad88b 100644 --- a/pages/advanced-algorithms/available-algorithms/merge.mdx +++ b/pages/advanced-algorithms/available-algorithms/merge.mdx @@ -16,7 +16,7 @@ It ensures precision and coherence in managing interconnected data structures. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/merge_module/merge_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/merge_module/merge_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/meta.mdx b/pages/advanced-algorithms/available-algorithms/meta.mdx index 743832583..003535ed0 100644 --- a/pages/advanced-algorithms/available-algorithms/meta.mdx +++ b/pages/advanced-algorithms/available-algorithms/meta.mdx @@ -21,7 +21,7 @@ The **meta** module provides a set of procedures for generating metadata about t } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/meta_module/meta_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/meta_module/meta_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/meta_util.mdx b/pages/advanced-algorithms/available-algorithms/meta_util.mdx index 69574b053..bb1cc714a 100644 --- a/pages/advanced-algorithms/available-algorithms/meta_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/meta_util.mdx @@ -16,7 +16,7 @@ A module that contains procedures describing graphs on a meta-level. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/meta_util.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/meta_util.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/neighbors.mdx b/pages/advanced-algorithms/available-algorithms/neighbors.mdx index ce0cd70a0..585b059a5 100644 --- a/pages/advanced-algorithms/available-algorithms/neighbors.mdx +++ b/pages/advanced-algorithms/available-algorithms/neighbors.mdx @@ -18,7 +18,7 @@ network structure and connectivity. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/neighbors_module/neighbors_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/neighbors_module/neighbors_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/node.mdx b/pages/advanced-algorithms/available-algorithms/node.mdx index 5ed38df04..ba71b7e57 100644 --- a/pages/advanced-algorithms/available-algorithms/node.mdx +++ b/pages/advanced-algorithms/available-algorithms/node.mdx @@ -15,7 +15,7 @@ The `node` module provides a comprehensive toolkit for managing graph nodes, ena } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/node_module/node_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/node_module/node_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/node2vec.mdx b/pages/advanced-algorithms/available-algorithms/node2vec.mdx index 01b6a6e24..a58a9c685 100644 --- a/pages/advanced-algorithms/available-algorithms/node2vec.mdx +++ b/pages/advanced-algorithms/available-algorithms/node2vec.mdx @@ -66,7 +66,7 @@ are correct in approximately 75% cases). } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/node2vec.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/node2vec.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/node_similarity.mdx b/pages/advanced-algorithms/available-algorithms/node_similarity.mdx index b5696e96e..57589271d 100644 --- a/pages/advanced-algorithms/available-algorithms/node_similarity.mdx +++ b/pages/advanced-algorithms/available-algorithms/node_similarity.mdx @@ -52,7 +52,7 @@ takes into account pairwise similarities between two set of nodes. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/node_similarity_module/node_similarity_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/node_similarity_module/node_similarity_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/nodes.mdx b/pages/advanced-algorithms/available-algorithms/nodes.mdx index cfd3c5103..22cdff1ef 100644 --- a/pages/advanced-algorithms/available-algorithms/nodes.mdx +++ b/pages/advanced-algorithms/available-algorithms/nodes.mdx @@ -15,7 +15,7 @@ The `nodes` module provides a comprehensive toolkit for managing multiple graph } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/nodes_module/nodes_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/nodes_module/nodes_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/pagerank.mdx b/pages/advanced-algorithms/available-algorithms/pagerank.mdx index 045b6509a..8ceabb59d 100644 --- a/pages/advanced-algorithms/available-algorithms/pagerank.mdx +++ b/pages/advanced-algorithms/available-algorithms/pagerank.mdx @@ -42,7 +42,7 @@ PageRank implementation. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/pagerank_module/pagerank_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/pagerank_module/pagerank_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/path.mdx b/pages/advanced-algorithms/available-algorithms/path.mdx index 6ae75ce9c..a34654d22 100644 --- a/pages/advanced-algorithms/available-algorithms/path.mdx +++ b/pages/advanced-algorithms/available-algorithms/path.mdx @@ -19,7 +19,7 @@ various other path-oriented operations. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/path_module/path_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/path_module/path_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/periodic.mdx b/pages/advanced-algorithms/available-algorithms/periodic.mdx index e480283c6..87f241e75 100644 --- a/pages/advanced-algorithms/available-algorithms/periodic.mdx +++ b/pages/advanced-algorithms/available-algorithms/periodic.mdx @@ -44,7 +44,7 @@ procedure, the already committed batches cannot be rolled back. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/periodic_module/periodic.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/periodic_module/periodic.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/refactor.mdx b/pages/advanced-algorithms/available-algorithms/refactor.mdx index 987f09a10..36d5c054f 100644 --- a/pages/advanced-algorithms/available-algorithms/refactor.mdx +++ b/pages/advanced-algorithms/available-algorithms/refactor.mdx @@ -15,7 +15,7 @@ The `refactor` module provides utilities for changing nodes and relationships. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/refactor_module/refactor_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/refactor_module/refactor_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/set_cover.mdx b/pages/advanced-algorithms/available-algorithms/set_cover.mdx index d8dd6023e..1d9d7c45a 100644 --- a/pages/advanced-algorithms/available-algorithms/set_cover.mdx +++ b/pages/advanced-algorithms/available-algorithms/set_cover.mdx @@ -22,7 +22,7 @@ a constraint programming solver. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/set_cover.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/set_cover.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/set_property.mdx b/pages/advanced-algorithms/available-algorithms/set_property.mdx index 6c991ef9b..6786c7d2c 100644 --- a/pages/advanced-algorithms/available-algorithms/set_property.mdx +++ b/pages/advanced-algorithms/available-algorithms/set_property.mdx @@ -16,7 +16,7 @@ procedures included in it involve copying properties from one entity to another. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/set_property_module/set_property_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/set_property_module/set_property_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/temporal.mdx b/pages/advanced-algorithms/available-algorithms/temporal.mdx index 0a7b62a02..fb26ff16f 100644 --- a/pages/advanced-algorithms/available-algorithms/temporal.mdx +++ b/pages/advanced-algorithms/available-algorithms/temporal.mdx @@ -17,7 +17,7 @@ functions. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/temporal.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/temporal.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/text.mdx b/pages/advanced-algorithms/available-algorithms/text.mdx index 2c738184f..2966458bb 100644 --- a/pages/advanced-algorithms/available-algorithms/text.mdx +++ b/pages/advanced-algorithms/available-algorithms/text.mdx @@ -20,7 +20,7 @@ The `text` module offers a toolkit for manipulating strings. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/text_module/text_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/text_module/text_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/tgn.mdx b/pages/advanced-algorithms/available-algorithms/tgn.mdx index 244bcc986..3574d2e1e 100644 --- a/pages/advanced-algorithms/available-algorithms/tgn.mdx +++ b/pages/advanced-algorithms/available-algorithms/tgn.mdx @@ -138,7 +138,7 @@ new edges are forwarded to the **TGN** and so on. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/tgn.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/tgn.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/tsp.mdx b/pages/advanced-algorithms/available-algorithms/tsp.mdx index 8b8cc9595..ac791253a 100644 --- a/pages/advanced-algorithms/available-algorithms/tsp.mdx +++ b/pages/advanced-algorithms/available-algorithms/tsp.mdx @@ -29,7 +29,7 @@ needs to have its *lat* and *lng* property. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/tsp.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/tsp.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/union_find.mdx b/pages/advanced-algorithms/available-algorithms/union_find.mdx index bf4a421f6..ab46a3c34 100644 --- a/pages/advanced-algorithms/available-algorithms/union_find.mdx +++ b/pages/advanced-algorithms/available-algorithms/union_find.mdx @@ -27,7 +27,7 @@ Algorithms](https://dl.acm.org/doi/10.1145/62.2160)" and presented with } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/union_find.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/union_find.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/util_module.mdx b/pages/advanced-algorithms/available-algorithms/util_module.mdx index 4349dc27c..c75b605ca 100644 --- a/pages/advanced-algorithms/available-algorithms/util_module.mdx +++ b/pages/advanced-algorithms/available-algorithms/util_module.mdx @@ -17,7 +17,7 @@ for streamlining a variety of tasks related to database operations. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/util_module/util_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/util_module/util_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/uuid_generator.mdx b/pages/advanced-algorithms/available-algorithms/uuid_generator.mdx index 464d1b3ed..f4d378305 100644 --- a/pages/advanced-algorithms/available-algorithms/uuid_generator.mdx +++ b/pages/advanced-algorithms/available-algorithms/uuid_generator.mdx @@ -19,7 +19,7 @@ installed by running `sudo apt-get install uuid-dev`. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/uuid_module/uuid_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/uuid_module/uuid_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/vrp.mdx b/pages/advanced-algorithms/available-algorithms/vrp.mdx index 419b41e14..22791a88b 100644 --- a/pages/advanced-algorithms/available-algorithms/vrp.mdx +++ b/pages/advanced-algorithms/available-algorithms/vrp.mdx @@ -31,7 +31,7 @@ have its *lat* and *lng* property. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/vrp.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/vrp.py" /> diff --git a/pages/advanced-algorithms/available-algorithms/weakly_connected_components.mdx b/pages/advanced-algorithms/available-algorithms/weakly_connected_components.mdx index bbf987914..d2e949d80 100644 --- a/pages/advanced-algorithms/available-algorithms/weakly_connected_components.mdx +++ b/pages/advanced-algorithms/available-algorithms/weakly_connected_components.mdx @@ -20,7 +20,7 @@ there is no edge that connects nodes from separate components. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/connectivity_module/connectivity_module.cpp" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/cpp/connectivity_module/connectivity_module.cpp" /> diff --git a/pages/advanced-algorithms/available-algorithms/xml_module.mdx b/pages/advanced-algorithms/available-algorithms/xml_module.mdx index bf681e96d..16edf36e6 100644 --- a/pages/advanced-algorithms/available-algorithms/xml_module.mdx +++ b/pages/advanced-algorithms/available-algorithms/xml_module.mdx @@ -16,7 +16,7 @@ loading and parsing XML data. } title="Source code" - href="https://github.com/memgraph/memgraph/blob/master/mage/python/xml_module.py" + href="https://github.com/memgraph/memgraph/blob/master/src/mage/python/xml_module.py" /> diff --git a/pages/advanced-algorithms/install-mage.mdx b/pages/advanced-algorithms/install-mage.mdx index feb131926..81cab9145 100644 --- a/pages/advanced-algorithms/install-mage.mdx +++ b/pages/advanced-algorithms/install-mage.mdx @@ -124,49 +124,25 @@ Memgraph package](/getting-started/install-memgraph). Algorithms and query modules will be loaded into a Memgraph instance on startup once you install MAGE, so make sure your instances are not running. -{

Install dependencies

} - -To build from source, you will need: -- Python3 -- Make -- CMake -- Clang -- UUID -- [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) - -{

Set up the machine

} +{

Download the Memgraph source code

} -Run the following commands: +MAGE is developed and built as part of the Memgraph repository. Clone the +[Memgraph source code](https://github.com/memgraph/memgraph) from GitHub +(install `git` first if you don't have it — `sudo apt-get install -y git`): -```bash -sudo apt-get update && sudo apt-get install -y \ - libcurl4 \ - libpython3.12 \ - libssl-dev \ - openssl \ - build-essential \ - cmake \ - curl \ - g++ \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-dev \ - clang \ - git \ - pkg-config \ - uuid-dev \ - xmlsec1 \ - ninja-build \ - --no-install-recommends +``` +git clone https://github.com/memgraph/memgraph.git && cd memgraph/ ``` -{

Download the MAGE source code

} +{

Install dependencies

} -Clone the [Memgraph source code](https://github.com/memgraph/memgraph) from GitHub: +The repository ships scripts that install everything the toolchain and the +build need — `build.sh` checks for both sets and stops if anything is +missing: -``` -git clone https://github.com/memgraph/memgraph.git && cd memgraph/ +```bash +sudo ./environment/os/install_deps.sh install TOOLCHAIN_RUN_DEPS +sudo ./environment/os/install_deps.sh install MEMGRAPH_BUILD_DEPS ``` {

Set up the toolchain

} @@ -177,23 +153,18 @@ curl -L https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-v7/toolcha sudo tar xzvfm toolchain.tar.gz -C /opt ``` -Install runtime dependencies for the toolchain: -```bash -sudo ./environment/os/install_deps.sh install TOOLCHAIN_RUN_DEPS -``` - {

Install Rust and Python dependencies

} -Run the following command to install Rust and Python dependencies: +Run the following commands from the root of the repository to install Rust +and the Python packages the MAGE query modules use at runtime: ```shell -cd mage -curl https://sh.rustup.rs -sSf | sh -s -- -y -export PATH="/root/.cargo/bin:${PATH}" -python3 -m pip install -r python/requirements.txt -python3 -m pip install -r ../src/auth/reference_modules/requirements.txt -python3 -m pip install torch-sparse torch-cluster torch-spline-conv torch-geometric torch-scatter -f https://data.pyg.org/whl/torch-2.6.0+cpu.html -python3 -m pip install dgl -f https://data.dgl.ai/wheels/torch-2.6/repo.html +source environment/util.sh +install_rust 1.89 +python3 -m pip install -r src/mage/python/requirements.txt +python3 -m pip install -r src/auth/reference_modules/requirements.txt +python3 -m pip install torch-sparse torch-cluster torch-spline-conv torch-geometric torch-scatter -f https://data.pyg.org/whl/torch-2.8.0+cpu.html +python3 -m pip install dgl -f https://data.dgl.ai/wheels/torch-2.8/repo.html ``` @@ -201,46 +172,50 @@ python3 -m pip install dgl -f https://data.dgl.ai/wheels/torch-2.6/repo.html To install the dependencies for GPU-accelerated algorithms, you need to use the GPU-specific requirements file: ```shell -python3 -m pip install -r python/requirements-gpu.txt +python3 -m pip install -r src/mage/python/requirements-gpu.txt ``` -{

Run the `setup` script

} +{

Build and install MAGE

} -Run the following command: +MAGE is built with the same build system as Memgraph. Run the following +commands from the root of the repository: ```shell source /opt/toolchain-v7/activate -python3 setup build -sudo cp -r dist/* /usr/lib/memgraph/query_modules +./build.sh --mage only +sudo cmake --install build --component mage --prefix /usr ``` - +`./build.sh --mage only` builds just the MAGE query modules (C++, Python and +Rust) without Memgraph itself — the script sets up everything else it needs +(a Python virtual environment, the Conan package manager and the project's +dependencies) on first run. The built modules land in `build/mage/dist`. -If you don't need all of the algorithms you can build only some of them based on the laguauge. +The `cmake --install` command then installs the modules to +`/usr/lib/memgraph/query_modules`, the directory Memgraph loads query modules +from, together with the runtime libraries they need. -To build C++ based algorithms run: + + +If you don't need all of the algorithms, you can build a subset by passing +specific targets: ```shell -python3 setup build --lang cpp -``` +# Only the Python modules (a copy step - fast) +./build.sh --mage only --target mage_python_modules -To build Python based algorithms run: +# Only the Rust modules +./build.sh --mage only --target mage_rust_modules -```shell -python3 setup build --lang python +# Individual C++ modules by name +./build.sh --mage only --target map text ``` -The script will generate a `dist` directory with all the needed files. - -It will also copy the contents of the newly created `dist` directory to -`/usr/lib/memgraph/query_modules`. Memgraph loads algorithms and modules from -this directory. - -If something isn't installed properly, the `setup` script will stop the -installation process. If you have any questions, contact us on +If something isn't set up properly, the build will stop with an error. If you +have any questions, contact us on **[Discord](https://discord.gg/memgraph).** {

Start a Memgraph instance

} diff --git a/pages/custom-query-modules.mdx b/pages/custom-query-modules.mdx index 2812a598c..8ac636c1a 100644 --- a/pages/custom-query-modules.mdx +++ b/pages/custom-query-modules.mdx @@ -89,14 +89,14 @@ Then, select a language you want to develop in. {

Develop a query

} - When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/mage) and extend based on that. + When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/src/mage) and extend based on that. If you are not extending the existing query modules, you can start from scratch by following these guides or using the API docs and knowledge to develop your query modules. - [Python](/custom-query-modules/python), - [C](/custom-query-modules/c), - [C++](/custom-query-modules/cpp), - - [Rust](https://github.com/memgraph/memgraph/tree/master/mage/rust/rsmgp-example). + - [Rust](https://github.com/memgraph/memgraph/tree/master/src/mage/rust/rsmgp-example). {

Start the MAGE container

} @@ -210,14 +210,14 @@ Then, select a language you want to develop in. {

Develop modules

} - When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/mage) and extend based on that. + When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/src/mage) and extend based on that. If you are not extending the existing query modules, you can start from scratch by following these guides or using the API docs and knowledge to develop your query modules. - [Python](/custom-query-modules/python), - [C](/custom-query-modules/c), - [C++](/custom-query-modules/cpp), - - [Rust](https://github.com/memgraph/memgraph/tree/master/mage/rust/rsmgp-example). + - [Rust](https://github.com/memgraph/memgraph/tree/master/src/mage/rust/rsmgp-example). {

Create the `dev` image

} @@ -279,106 +279,54 @@ Then, select a language you want to develop in. - {

Install dependencies

} - - To build from source, you will need: - - Python3 - - Make - - CMake - - Clang - - UUID - - [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) - - {

Set up the machine

} - - Run the following commands: - - ```bash - PY_VERSION="$(python3 --version | cut -d' ' -f2 | cut -d'.' -f1,2)" - sudo apt update - sudo apt install -y \ - libcurl4 \ - libpython${PY_VERSION} \ - libssl-dev \ - openssl \ - build-essential \ - cmake \ - curl \ - g++ \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-dev \ - clang \ - git \ - libboost-dev \ - ninja-build \ - --no-install-recommends - ``` - - {

Download the Memgraph source code

} - - Clone the [Memgraph source code](https://github.com/memgraph/memgraph) from GitHub: + {

Set up the build environment

} - ``` - git clone https://github.com/memgraph/memgraph.git && cd memgraph/mage - ``` + Follow the [Build from source + guide](/advanced-algorithms/install-mage#build-from-source-linux) to clone + the Memgraph repository, install the build dependencies, set up the + toolchain and install the Rust and Python dependencies. - {

Run the `setup` script

} + {

Build MAGE

} - Run the following command: + Run the following commands from the root of the repository: ```shell - python3 setup build -p /usr/lib/memgraph/query_modules + source /opt/toolchain-v7/activate + ./build.sh --mage only ``` - The script will generate a `dist` directory with all the necessary files. - - It will also copy the contents of the newly created `dist` directory to - `/usr/lib/memgraph/query_modules`. Memgraph loads algorithms and modules from - this directory. - - If something isn't installed properly, the `setup` script will stop the - installation process. If you have any questions, contact us on - **[Discord](https://discord.gg/memgraph).** - - {
Set a different `query_modules` directory
} + The built query modules land in `build/mage/dist`. - The `setup` script can set your local `mage/dist` directory or any other - directory as the default one by changing the value of the - `--query-modules-directory` flag in the `/etc/memgraph/memgraph.conf`, - Memgraph's configuration file. + {

Install the query modules

} - By setting the `/mage/dist` as the default directory you don't need to copy - `*.so` and `*.py` files from the `mage/dist` directory - to`/usr/lib/memgraph/query_modules` every time you run `build`: + Install the modules to `/usr/lib/memgraph/query_modules`, the directory + Memgraph loads query modules from: - ``` - python3 setup modules_storage + ```shell + sudo cmake --install build --component mage --prefix /usr ``` - By setting `` as the default one, Memgraph will be looking for - query modules inside ``, instead of `/usr/lib/memgraph/query_modules`: + - ``` - python3 setup modules_storage -p - ``` + While developing, you can skip the install step on every rebuild by + pointing Memgraph directly at the build output instead: set + `--query-modules-directory=/build/mage/dist` in + `/etc/memgraph/memgraph.conf` (or on the command line). - Don't forget to copy the aforementioned files from `mage/dist` to - ``. + {

Develop modules

} - When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/mage) and extend based on that. + When developing with Mage, take a look at the basis of developed [algorithms and utility procedures](https://github.com/memgraph/memgraph/tree/master/src/mage) and extend based on that. If you are not extending the existing query modules, you can start from scratch by following these guides or using the API docs and knowledge to develop your query modules. - [Python](/custom-query-modules/python), - [C](/custom-query-modules/c), - [C++](/custom-query-modules/cpp), - - [Rust](https://github.com/memgraph/memgraph/tree/master/mage/rust/rsmgp-example). + - [Rust](https://github.com/memgraph/memgraph/tree/master/src/mage/rust/rsmgp-example). - {

Start Memgraph

} + {

Rebuild and load your changes

} Make sure your Memgraph instance is running: @@ -386,12 +334,18 @@ Then, select a language you want to develop in. sudo systemctl status memgraph.service ``` - {

Copy the query module

} - - Copy your developed query module to `/usr/lib/memgraph/query_modules` or your directory if you changed the default location of query modules: + After changing a module, rebuild and reinstall (the install step isn't + needed if you pointed `--query-modules-directory` at `build/mage/dist`): ```shell - python3 setup build -p /usr/lib/memgraph/query_modules + ./build.sh --mage only --dev + sudo cmake --install build --component mage --prefix /usr + ``` + + Then reload the query modules in a running instance: + + ```cypher + CALL mg.load_all(); ```
diff --git a/pages/custom-query-modules/contributing.mdx b/pages/custom-query-modules/contributing.mdx index 9e8d4fedb..0561f6705 100644 --- a/pages/custom-query-modules/contributing.mdx +++ b/pages/custom-query-modules/contributing.mdx @@ -18,7 +18,7 @@ Here are links to Memgraph and MAGE, which are both opened and ready to receive and your contribution: - [**Memgraph**](https://github.com/memgraph/memgraph) -- [**MAGE**](https://github.com/memgraph/memgraph/tree/master/mage) (NOTE: MAGE now lives in the Memgraph repository) +- [**MAGE**](https://github.com/memgraph/memgraph/tree/master/src/mage) (NOTE: MAGE now lives in the Memgraph repository) Feel free to create an issue or open a pull request on our Github repo to speed up the development. diff --git a/pages/custom-query-modules/cpp/cpp-example.mdx b/pages/custom-query-modules/cpp/cpp-example.mdx index 8604315c4..a3bed2132 100644 --- a/pages/custom-query-modules/cpp/cpp-example.mdx +++ b/pages/custom-query-modules/cpp/cpp-example.mdx @@ -1101,7 +1101,7 @@ cpp To make sure the module is linked with the rest of MAGE code, we need to add a `CMakeLists.txt` script in the new directory and register our module in the `cpp/CMakelists.txt` script as well. Refer to the existing scripts in MAGE’s -[query modules](https://github.com/memgraph/memgraph/tree/master/mage/cpp). +[query modules](https://github.com/memgraph/memgraph/tree/master/src/mage/cpp).
diff --git a/pages/getting-started/packaging-memgraph.mdx b/pages/getting-started/packaging-memgraph.mdx index faa373d84..2c0e37aef 100644 --- a/pages/getting-started/packaging-memgraph.mdx +++ b/pages/getting-started/packaging-memgraph.mdx @@ -9,10 +9,11 @@ import { Steps } from 'nextra/components' # Package Memgraph This guide will show you how to package Memgraph for one of out supportedLinux distributions. -There are two main ways to package Memgraph: +There are three main ways to package Memgraph: - [Using the `mgbuild.sh` script](#using-the-mgbuildsh-script), which builds Memgraph in a Docker container. (Recommended) -- [Using CPack](#using-cpack), which builds Memgraph using CMake. +- [Using the `package.sh` script](#using-the-packagesh-script), which packages a local build directory. +- [Using CPack](#using-cpack), which invokes CPack manually. The distributions of Linux currently supported by Memgraph are and their associated `OS` environment variable: @@ -114,12 +115,41 @@ sudo apt install ./output/memgraph__.deb +## Using the `package.sh` script + +After following the build instructions using +[`build.sh`](/getting-started/build-memgraph-from-source#use-buildsh-script), or +[`conan` and `cmake`](/getting-started/build-memgraph-from-source#use-conan-and-cmake), the +`package.sh` script in the repository root packages the build directory directly on the host. +It takes a target and a package format: + +```bash +source /opt/toolchain-v7/activate +./package.sh memgraph deb +``` + +- `TARGET` is one of `memgraph` (the `memgraph` + `memgraph-debuginfo` packages), `mage` + (the `memgraph-mage` package, plus `memgraph-mage-debuginfo` when the build used + `--split-debug`), or `all` (everything the build was configured for). +- `FORMAT` is `deb` or `rpm`. + +For example, to package the MAGE query modules as an RPM from a +`./build.sh --mage only` build: + +```bash +./package.sh mage rpm +``` + +The script checks that the build directory is actually configured for the requested target +(e.g. packaging `mage` requires a build with `--mage on` or `--mage only`), selects the right +CPack components, and verifies the expected number of packages was produced. The packages are +written to `build/output/`. Use `--build-dir DIR` to package from a non-default build +directory. + ## Using CPack -After following the build instructions using -[`build.sh`](/getting-started/build-memgraph-from-source#use-buildsh-script), or -[`conan` and `cmake`](/getting-started/build-memgraph-from-source#use-conan-and-cmake), one can use -CPackto build a Memgraph package for a Linux distribution. +`package.sh` is a thin wrapper around CPack — if you need full control, you can also invoke +CPack manually. Prior to packaging, create the output directory: From 4fbedadd34e801c579d7e9e96cbfd1e2c5f36673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:21:54 +0200 Subject: [PATCH 5/9] docs: add convert module JSON conversion functions (#1699) * docs: document convert from_json_map/list, to_map and to_json Document the four JSON/map conversion functions in the convert module, including the optional path selector, its supported syntax, and the structured to_json output for nodes, relationships, paths, points and temporals. * docs: correct convert.to_map arg name and to_json node example * docs: add APOC-equivalence callouts and mapping-table rows for convert JSON functions * docs: steer json_util JSON functions to the convert module * docs: move convert-module steer to per-function callouts in json_util * docs: render convert map/list results as Cypher values, not JSON * docs: correct convert.to_map description for non-map values * docs: note convert.to_json supported types and enum error --- .../available-algorithms.mdx | 6 +- .../available-algorithms/convert.mdx | 209 +++++++++++++++++- .../available-algorithms/json_util.mdx | 8 +- 3 files changed, 211 insertions(+), 12 deletions(-) diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index b6e6dc234..3b6bf14ed 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -174,8 +174,10 @@ Running `SHOW QUERY CALLABLE MAPPINGS` requires the `CONFIG` privilege. | apoc.coll.sum | Calculates the sum of listed elements | [collections.sum()](/advanced-algorithms/available-algorithms/collections#sum) | | apoc.coll.partition | Partitions the input list into sub-lists of the specified size | [collections.partition()](/advanced-algorithms/available-algorithms/collections#partition) | | apoc.convert.toTree | Converts values into tree structures | [convert_c.to_tree()](/advanced-algorithms/available-algorithms/convert_c#to_tree) | -| apoc.convert.fromJsonList | Converts a JSON string representation of a list into an actual list object | [json_util.from_json_list()](/advanced-algorithms/available-algorithms/json_util#from_json_list) | -| apoc.convert.toJson | Converts any value to its JSON string representation | [json_util.to_json()](/advanced-algorithms/available-algorithms/json_util#to_json) | +| apoc.convert.fromJsonList | Converts a JSON string representation of a list into an actual list object | [convert.from_json_list()](/advanced-algorithms/available-algorithms/convert#from_json_list) | +| apoc.convert.fromJsonMap | Converts a JSON string representation of a map into an actual map object | [convert.from_json_map()](/advanced-algorithms/available-algorithms/convert#from_json_map) | +| apoc.convert.toJson | Converts any value to its JSON string representation | [convert.to_json()](/advanced-algorithms/available-algorithms/convert#to_json) | +| apoc.convert.toMap | Converts a value into a map | [convert.to_map()](/advanced-algorithms/available-algorithms/convert#to_map) | | apoc.create.node | Creates a single node with specified labels and properties | [create.node()](/advanced-algorithms/available-algorithms/create#node) | | apoc.create.nodes | Creates multiple nodes with specified labels and properties | [create.nodes()](/advanced-algorithms/available-algorithms/create#nodes) | | apoc.create.removeProperties | Removes properties from nodes | [create.remove_properties()](/advanced-algorithms/available-algorithms/create#remove_properties) | diff --git a/pages/advanced-algorithms/available-algorithms/convert.mdx b/pages/advanced-algorithms/available-algorithms/convert.mdx index e4890a260..cc784d6d6 100644 --- a/pages/advanced-algorithms/available-algorithms/convert.mdx +++ b/pages/advanced-algorithms/available-algorithms/convert.mdx @@ -54,12 +54,205 @@ Use the following query to convert a JSON string to an object: RETURN convert.str2object('{"name": "Alice", "age": 30, "city": "New York"}') AS result; ``` -The output shows the parsed object: - -```json -{ - "name": "Alice", - "age": 30, - "city": "New York" -} +The output shows the parsed map: + +```plaintext +{name: "Alice", age: 30, city: "New York"} +``` + +### `from_json_map()` + +Parses a JSON-object string into a map. An optional `path` selects a nested part +of the document before conversion; the selected value must be a JSON object. + + +This function is equivalent to **apoc.convert.fromJsonMap**. + + +{

Input:

} + +- `map: String` ➡ The JSON string to parse. A `null` value returns `null`. +- `path: String` (default `""`) ➡ An optional selector for a nested part of the + document (see [Path option](#path-option)). + +{

Output:

} + +- `Map` ➡ The parsed map. Returns `null` when the input is `null`, when the path + does not resolve, or when the selected value is JSON `null`. An error is raised + when the input (or selected value) is not a JSON object. + +{

Usage:

} + +```cypher +RETURN convert.from_json_map('{"name": "GDS"}') AS result; +``` + +```plaintext +{name: "GDS"} +``` + +Select a nested object with `path`: + +```cypher +RETURN convert.from_json_map('{"a": 1, "b": {"c": 2, "d": [10, 20]}}', '$.b') AS result; +``` + +```plaintext +{c: 2, d: [10, 20]} +``` + +To read a single value out of the parsed map, index it with Cypher instead of +using `path`: + +```cypher +RETURN convert.from_json_map('{"mode": "fast"}')['mode'] AS result; +``` + +```text +"fast" +``` + +### `from_json_list()` + +Parses a JSON-array string into a list. An optional `path` selects a nested part +of the document before conversion; the selected value must be a JSON array. + + +This function is equivalent to **apoc.convert.fromJsonList**. + + +{

Input:

} + +- `list: String` ➡ The JSON string to parse. A `null` value returns `null`. +- `path: String` (default `""`) ➡ An optional selector for a nested part of the + document (see [Path option](#path-option)). + +{

Output:

} + +- `List` ➡ The parsed list. Returns `null` when the input is `null`, when the + path does not resolve, or when the selected value is JSON `null`. An error is + raised when the input (or selected value) is not a JSON array. + +{

Usage:

} + +```cypher +RETURN convert.from_json_list('[1, 2, 3]') AS result; +``` + +```plaintext +[1, 2, 3] +``` + +Select a nested array with `path`: + +```cypher +RETURN convert.from_json_list('{"a": [1, 2, 3]}', '$.a') AS result; +``` + +```plaintext +[1, 2, 3] +``` + +### Path option + +`from_json_map()` and `from_json_list()` accept an optional `path` that selects a +nested part of the JSON document before conversion. + +| Syntax | Meaning | Example (on `{"a": 1, "b": {"c": 2, "e": [10, 20]}}`) | +| ------ | ------- | ----------------------------------------------------- | +| `$` / empty / `null` | The whole document | `$` selects the whole object | +| `.key` | Object key step | `$.b` selects `{"c": 2, "e": [10, 20]}` | +| `['key']` or `["key"]` | Quoted key step, for keys with dots, spaces or special characters | `$['b']` selects `{"c": 2, "e": [10, 20]}` | +| `[index]` | Array element, 0-based | `$.b.e[1]` selects `20` | + +Steps chain left to right (`$.b.e[0]` selects `10`), and a leading `$` is +optional (`a.b` is equivalent to `$.a.b`). Wildcards (`$.e[*]`), recursive +descent (`$..x`), filter expressions and array slices are not supported and raise +an error. A path that does not resolve, or that resolves to JSON `null`, returns +`null`. + +### `to_map()` + +Returns a map unchanged, or a node or relationship as its property map. Any +other value — such as an integer, string or list — returns `null`. + + +This function is equivalent to **apoc.convert.toMap**. + + +{

Input:

} + +- `map: Any` ➡ The value to convert. + +{

Output:

} + +- `Map` ➡ A map is returned unchanged, a node or relationship is returned as its + property map, and `null` or any other value returns `null`. + +{

Usage:

} + +```cypher +CREATE (n:Person {id: 4, name: 'z'}) +RETURN convert.to_map(n) AS result; +``` + +```plaintext +{id: 4, name: "z"} +``` + +### `to_json()` + +Serializes a value into a JSON string. + + +This function is equivalent to **apoc.convert.toJson**. + + +{

Input:

} + +- `value: Any` ➡ The value to serialize. + +{

Output:

} + +- `String` ➡ The JSON string representation of the value. + +Scalars, lists and maps are serialized directly. Graph and spatial-temporal +values use a structured form: + +- **Node** ➡ `{id, type: "node", labels, properties}`; `labels` and `properties` + are omitted when empty. +- **Relationship** ➡ `{id, type: "relationship", label, start, end, properties}`, + where `start` and `end` are full node objects; `properties` is omitted when empty. +- **Path** ➡ a flat array `[node, relationship, node, ...]`. +- **Point** ➡ `{crs, x, y, z}` for cartesian points, `{crs, longitude, latitude, + height}` for geographic points. +- **Temporal** ➡ the canonical string form (for example `"2020-01-02"` for a + date, an ISO-8601 period with a fixed six-digit fractional-second field for a + duration, e.g. `"P1DT2H3M4.500000S"`). + +Object keys are serialized in alphabetical order, and the order of the `labels` +array follows the node's internal label IDs, so it is not guaranteed. + +Null, boolean, numeric, string, list, map, node, relationship, path, point and +temporal values are all supported. Serializing an enum value raises an error. + +{

Usage:

} + +```cypher +RETURN convert.to_json({a: 1, b: 'x', c: [1, 2], d: null}) AS result; +``` + +```text +{"a":1,"b":"x","c":[1,2],"d":null} +``` + +Serialize a node: + +```cypher +CREATE (n:Person:Human {name: 'Ana', age: 30}) +RETURN convert.to_json(n) AS result; +``` + +```text +{"id":"0","labels":["Person","Human"],"properties":{"age":30,"name":"Ana"},"type":"node"} ``` diff --git a/pages/advanced-algorithms/available-algorithms/json_util.mdx b/pages/advanced-algorithms/available-algorithms/json_util.mdx index 2b77d21de..0f2dae62d 100644 --- a/pages/advanced-algorithms/available-algorithms/json_util.mdx +++ b/pages/advanced-algorithms/available-algorithms/json_util.mdx @@ -35,7 +35,9 @@ and if it is a map, the module loads it as a single value. Converts a JSON string representation of a list into an actual list object. -This function is equivalent to **apoc.convert.fromJsonList**. +Prefer the C++ [`convert.from_json_list`](/advanced-algorithms/available-algorithms/convert#from_json_list), +which is what `apoc.convert.fromJsonList` maps to. This Python version can +produce slightly different output. {

Input:

} @@ -69,7 +71,9 @@ Results: Converts any value to its JSON string representation. -This function is equivalent to **apoc.convert.toJson**. +Prefer the C++ [`convert.to_json`](/advanced-algorithms/available-algorithms/convert#to_json), +which is what `apoc.convert.toJson` maps to. This Python version can produce +slightly different output. {

Input:

} From 059e88cd1f60382da31eacdacca0bf25fcbf67ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:54:15 +0200 Subject: [PATCH 6/9] Add search module documentation (search.node, search.node_all) (#1698) * Add search module documentation (search.node, search.node_all) * Add search module to available-algorithms index and APOC mappings * docs: clarify =~ is not string-only-guarded in search operators --------- Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com> --- .../available-algorithms.mdx | 5 +- .../available-algorithms/_meta.ts | 1 + .../available-algorithms/search.mdx | 196 ++++++++++++++++++ 3 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 pages/advanced-algorithms/available-algorithms/search.mdx diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index 3b6bf14ed..b17899937 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -111,7 +111,8 @@ If you want to know more and learn how this affects you, read our [announcement] | [nodes](/advanced-algorithms/available-algorithms/nodes) | C++ | A module that provides a comprehensive toolkit for managing multiple graph nodes, enabling linking, updating, type deduction and more. | | [periodic](/advanced-algorithms/available-algorithms/periodic) | C++ | A module containing procedures for periodically running difficult and/or memory/time consuming queries. | | [refactor](/advanced-algorithms/available-algorithms/refactor) | C++ | The refactor module provides utilities for changing nodes and relationships. | -| [rust_example](https://github.com/memgraph/memgraph/tree/master/src/mage/rust/rsmgp-example) | Rust | Example of a basic module with input parameters forwarding, made in Rust. | +| [rust_example](https://github.com/memgraph/memgraph/tree/master/mage/rust/rsmgp-example) | Rust | Example of a basic module with input parameters forwarding, made in Rust. | +| [search](/advanced-algorithms/available-algorithms/search) | C++ | A module for finding nodes by comparing one or more of their properties against a value with a comparison operator, without writing the equivalent `MATCH` and `WHERE` clauses. | | [set_property](/advanced-algorithms/available-algorithms/set_property) | C++ | A module for dynamical access and editing of node and relationship properties. | | [temporal](/advanced-algorithms/available-algorithms/temporal) | Python | A module that provides functions to handle temporal (time-related) operations and offers extended capabilities compared to the date module. | | [text](/advanced-algorithms/available-algorithms/text) | C++ | The `text` module offers a toolkit for manipulating strings. | @@ -204,6 +205,8 @@ Running `SHOW QUERY CALLABLE MAPPINGS` requires the `CONFIG` privilege. | apoc.refactor.renameType | Changes the relationship type | [refactor.rename_type()](/advanced-algorithms/available-algorithms/refactor#rename_type) | | apoc.refactor.rename.typeProperty | Renames the property of a relationship | [refactor.rename_type_property()](/advanced-algorithms/available-algorithms/refactor#rename_type_property) | | apoc.refactor.mergeNodes | Merges properties, labels and relationships for source nodes to target node | [refactor.mergeNodes()](/advanced-algorithms/available-algorithms/refactor#mergenodes) | +| apoc.search.node | Finds nodes by a label-property map and comparison operator, returning each matching node once | [search.node()](/advanced-algorithms/available-algorithms/search#node) | +| apoc.search.nodeAll | Finds nodes by a label-property map and comparison operator, returning one row per matching property | [search.node_all()](/advanced-algorithms/available-algorithms/search#node_all) | | apoc.text.join | Joins all strings into a single one with given delimiter | [text.join()](/advanced-algorithms/available-algorithms/text#join) | | apoc.text.indexOf | Finds the index of first occurrence of a substring within a string | [text.indexOf()](/advanced-algorithms/available-algorithms/text#indexof) | | apoc.text.regexGroups | Returns all matched subexpressions of regex on provided text | [text.regexGroups()](/advanced-algorithms/available-algorithms/text#regexgroups) | diff --git a/pages/advanced-algorithms/available-algorithms/_meta.ts b/pages/advanced-algorithms/available-algorithms/_meta.ts index 885416252..d81ceb7e4 100644 --- a/pages/advanced-algorithms/available-algorithms/_meta.ts +++ b/pages/advanced-algorithms/available-algorithms/_meta.ts @@ -59,6 +59,7 @@ export default { "path": "path", "periodic": "periodic", "refactor": "refactor", + "search": "search", "set_cover": "set_cover", "set_property": "set_property", "temporal": "temporal", diff --git a/pages/advanced-algorithms/available-algorithms/search.mdx b/pages/advanced-algorithms/available-algorithms/search.mdx new file mode 100644 index 000000000..18d3d6bcb --- /dev/null +++ b/pages/advanced-algorithms/available-algorithms/search.mdx @@ -0,0 +1,196 @@ +--- +title: search +description: Look up nodes by a label and property value in Memgraph using a comparison operator, without writing the equivalent MATCH and WHERE clauses. +--- + +import { Callout } from 'nextra/components' +import { Cards } from 'nextra/components' +import GitHub from '/components/icons/GitHub' + +# search + +The `search` module finds nodes by comparing one or more of their properties +against a value. You describe which properties to search with a `{label: +property}` map, pick a comparison operator, and provide the value to compare +against, instead of writing the equivalent `MATCH` and `WHERE` clauses yourself. +When a matching label-property index exists, it is used automatically. + + + } + title="Source code" + href="https://github.com/memgraph/memgraph/blob/master/mage/cpp/search_module/search_module.cpp" + /> + + +| Trait | Value | +| ------------------ | ---------- | +| **Module type** | module | +| **Implementation** | C++ | +| **Parallelism** | sequential | + +## Procedures + +Both procedures take the same arguments and differ only in how they handle a +node that matches more than once: `search.node` returns each matching node once, +while `search.node_all` returns one row per property that matches. + +### Arguments + +The `label_property_map` argument names the labels and properties to search. It +is a map from a label to a single property or to a list of properties, for +example `{Person: "name"}` or `{Person: ["name", "email"]}`. When a label maps +to a list of properties, a node matches if **any** of those properties matches +the value. The map may also be given as a JSON string, for example +`'{"Person": "name"}'` or `'{"Person": ["name", "email"]}'`. + +The `operator` argument selects the comparison to apply and is case-insensitive: + +| Operator | Meaning | +| ------------- | ---------------------------------------------------- | +| `=` / `exact` | Equal to the value. | +| `<>` | Not equal to the value. | +| `<` | Less than the value. | +| `<=` | Less than or equal to the value. | +| `>` | Greater than the value. | +| `>=` | Greater than or equal to the value. | +| `starts with` | String starts with the value. | +| `ends with` | String ends with the value. | +| `contains` | String contains the value. | +| `=~` | String matches the value as a regular expression. | + +The `starts with`, `ends with` and `contains` operators only match string +properties; against a non-string property they safely skip the node. The `=~` +regular-expression operator is not guarded this way and should only be used +against string properties. String comparisons are performed by codepoint, so +uppercase letters sort before lowercase ones. + +### `node()` + +Returns each node that matches the search criteria once, even if it matches on +more than one label or property. + + +This procedure is equivalent to **apoc.search.node**. + + +{

Input:

} + +- `label_property_map: Any` ➡ A map (or JSON string) from a label to the property or list of properties to search. +- `operator: string` ➡ The comparison operator to apply. Case-insensitive. +- `value: string` ➡ The value to compare each property against. If `null`, no nodes are returned. + +{

Output:

} + +- `node: Node` ➡ A node matching the search criteria. Each matching node is returned once. + +{

Usage:

} + +Given the following graph: + +```cypher +CREATE (:Person {name: 'Alice'}); +CREATE (:Person {name: 'Bob'}); +CREATE (:Person {name: 'Bobby'}); +CREATE (:Person {name: 'Carol'}); +``` + +The following query returns every `Person` whose `name` is greater than or equal +to `'Bob'`: + +```cypher +CALL search.node({Person: 'name'}, '>=', 'Bob') YIELD node +RETURN node.name AS name ORDER BY name; +``` + +```plaintext ++----------------------------+ +| name | ++----------------------------+ +| "Bob" | +| "Bobby" | +| "Carol" | ++----------------------------+ +``` + +The `label_property_map` can also be given as a JSON string: + +```cypher +CALL search.node('{"Person": "name"}', 'exact', 'Bob') YIELD node +RETURN node.name AS name; +``` + +```plaintext ++----------------------------+ +| name | ++----------------------------+ +| "Bob" | ++----------------------------+ +``` + +When a node carries several of the searched labels, `search.node` still returns +it only once: + +```cypher +CREATE (:P {name: 'x'}); +CREATE (:M {title: 'x'}); +CREATE (:P:M {name: 'x', title: 'x'}); +``` + +```cypher +CALL search.node({P: 'name', M: 'title'}, 'exact', 'x') YIELD node +RETURN count(node) AS c; +``` + +```plaintext ++----------------------------+ +| c | ++----------------------------+ +| 3 | ++----------------------------+ +``` + +### `node_all()` + +Returns a node once for every property that matches the search criteria, so a +node that matches on several properties or labels appears in more than one row. + + +This procedure is equivalent to **apoc.search.nodeAll**. + + +{

Input:

} + +- `label_property_map: Any` ➡ A map (or JSON string) from a label to the property or list of properties to search. +- `operator: string` ➡ The comparison operator to apply. Case-insensitive. +- `value: string` ➡ The value to compare each property against. If `null`, no nodes are returned. + +{

Output:

} + +- `node: Node` ➡ A node matching the search criteria, returned once per matching property. + +{

Usage:

} + +Given the following graph, where one movie matches on `title` and the other on +`tagline`: + +```cypher +CREATE (:Movie {title: 'Matrix', tagline: 'Neo'}); +CREATE (:Movie {title: 'Heat', tagline: 'Matrix'}); +``` + +Searching both properties returns both movies: + +```cypher +CALL search.node_all('{"Movie": ["title", "tagline"]}', 'exact', 'Matrix') YIELD node +RETURN node.title AS title ORDER BY title; +``` + +```plaintext ++----------------------------+ +| title | ++----------------------------+ +| "Heat" | +| "Matrix" | ++----------------------------+ +``` From aab10727c632ac4050d09989ac658556b367efdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Tue, 28 Jul 2026 16:55:17 +0200 Subject: [PATCH 7/9] docs: Document collections NULL handling and add disjunction, subtract, duplicates (#1694) * docs: Document NULL handling for collections functions * docs: Document collections.disjunction, subtract, and duplicates * docs: List all collections functions in the compatibility table and mark their equivalents Add the compatibility-table rows for the collections functions that were missing (including disjunction, subtract, duplicates) and add the equivalence callout to the function pages that lacked one, so every collections function consistently states its compatibility mapping. * docs: Include disjunction, subtract, and duplicates in the NULL-handling matrix --- .../available-algorithms.mdx | 12 ++ .../available-algorithms/collections.mdx | 177 +++++++++++++++++- 2 files changed, 188 insertions(+), 1 deletion(-) diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index b17899937..83c873129 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -174,6 +174,18 @@ Running `SHOW QUERY CALLABLE MAPPINGS` requires the `CONFIG` privilege. | apoc.coll.toSet | Converts the input list to a set | [collections.to_set()](/advanced-algorithms/available-algorithms/collections#to_set) | | apoc.coll.sum | Calculates the sum of listed elements | [collections.sum()](/advanced-algorithms/available-algorithms/collections#sum) | | apoc.coll.partition | Partitions the input list into sub-lists of the specified size | [collections.partition()](/advanced-algorithms/available-algorithms/collections#partition) | +| apoc.coll.sort | Sorts the elements of an input list of the same data type | [collections.sort()](/advanced-algorithms/available-algorithms/collections#sort) | +| apoc.coll.containsSorted | Verifies the presence of an element in a sorted list | [collections.contains_sorted()](/advanced-algorithms/available-algorithms/collections#contains_sorted) | +| apoc.coll.containsAll | Checks if a list contains all the values from another list | [collections.contains_all()](/advanced-algorithms/available-algorithms/collections#contains_all) | +| apoc.coll.intersection | Returns the unique intersection of two lists | [collections.intersection()](/advanced-algorithms/available-algorithms/collections#intersection) | +| apoc.coll.disjunction | Returns the symmetric difference of two lists (elements in exactly one) | [collections.disjunction()](/advanced-algorithms/available-algorithms/collections#disjunction) | +| apoc.coll.subtract | Returns the first list with the elements of the second removed, deduplicated | [collections.subtract()](/advanced-algorithms/available-algorithms/collections#subtract) | +| apoc.coll.duplicates | Returns the values that appear more than once in a list | [collections.duplicates()](/advanced-algorithms/available-algorithms/collections#duplicates) | +| apoc.coll.sumLongs | Calculates the sum of list elements cast to integers | [collections.sum_longs()](/advanced-algorithms/available-algorithms/collections#sum_longs) | +| apoc.coll.avg | Calculates the average of listed elements | [collections.avg()](/advanced-algorithms/available-algorithms/collections#avg) | +| apoc.coll.max | Returns the maximum-value element of the input list | [collections.max()](/advanced-algorithms/available-algorithms/collections#max) | +| apoc.coll.min | Returns the minimum-value element of the input list | [collections.min()](/advanced-algorithms/available-algorithms/collections#min) | +| apoc.coll.split | Splits the provided list based on a specified delimiter | [collections.split()](/advanced-algorithms/available-algorithms/collections#split) | | apoc.convert.toTree | Converts values into tree structures | [convert_c.to_tree()](/advanced-algorithms/available-algorithms/convert_c#to_tree) | | apoc.convert.fromJsonList | Converts a JSON string representation of a list into an actual list object | [convert.from_json_list()](/advanced-algorithms/available-algorithms/convert#from_json_list) | | apoc.convert.fromJsonMap | Converts a JSON string representation of a map into an actual map object | [convert.from_json_map()](/advanced-algorithms/available-algorithms/convert#from_json_map) | diff --git a/pages/advanced-algorithms/available-algorithms/collections.mdx b/pages/advanced-algorithms/available-algorithms/collections.mdx index 4c6c7920c..bf80aa9d0 100644 --- a/pages/advanced-algorithms/available-algorithms/collections.mdx +++ b/pages/advanced-algorithms/available-algorithms/collections.mdx @@ -39,11 +39,53 @@ uncomparable.
Only `Numeric` data types can be used in `sum()` and `avg()` functions, so only `Int` and `Double` data types are allowed. +### Handling `NULL` values + +Passing `NULL` as a whole list (or scalar) argument no longer raises an +argument-validation error. Each function returns a defined result: + +| Function | Result when a list argument is `NULL` | +| --- | --- | +| `sum()`, `sum_longs()`, `avg()`, `min()`, `max()`, `to_set()`, `pairs()` | `null` | +| `union()`, `union_all()`, `disjunction()` | the other list; `null` when both are `NULL` | +| `remove_all()`, `subtract()` | `null` when the first list is `NULL`; the first list when the second is `NULL` | +| `intersection()`, `sort()`, `flatten()`, `duplicates()` | empty list `[]` | +| `contains()`, `contains_all()`, `contains_sorted()` | `false` | +| `frequencies_as_map()` | empty map `{}` | +| `split()`, `partition()` | no rows | + +`NULL` elements inside a list are handled per function: + +- `min()` and `max()` skip `NULL` elements; a list containing only `NULL` values returns `null`. +- `contains()` and `contains_all()` never match a `NULL` search value (`NULL = NULL` is not true), so searching for `NULL` returns `false`. +- `split()` treats a `NULL` delimiter as matching nothing and returns the whole list as a single part; `NULL` list elements are kept. +- `frequencies_as_map()` counts `NULL` elements under the `"NO_VALUE"` key. +- `flatten()`, `pairs()`, `to_set()`, `union()`, `union_all()`, `remove_all()`, `intersection()`, `disjunction()`, `subtract()` and `duplicates()` keep `NULL` elements as ordinary values. +- `sum()`, `sum_longs()`, `avg()`, `sort()` and `contains_sorted()` still reject a list that contains a `NULL` element; `contains_sorted()` also rejects a `NULL` search value, and `partition()` still rejects a `NULL` size. + +For example, a `NULL` argument returns the defined result instead of erroring: + +```cypher +RETURN collections.sum(null) AS sum, collections.sort(null) AS sorted; +``` + +```plaintext ++----------------------------+ +| sum | sorted | ++----------------------------+ +| null | [] | ++----------------------------+ +``` + ### `sort()` Sorts the elements of an input list if they are of the same data type. For the input list to be sorted, its elements must be comparable and of the same type. + +This function is equivalent to **apoc.coll.sort**. + + {

Input:

} - `coll: List[Any]` ➡ List of elements that need to be sorted. @@ -74,6 +116,10 @@ Verifies the presence of a certain element in a sorted list. If an unsorted list is passed, there is no guarantee that the result will be correct. For the input list to be sorted, its elements must be comparable and of the same type. + +This function is equivalent to **apoc.coll.containsSorted**. + + {

Input:

} - `coll: List[Any]` ➡ The target list where the element is searched for. @@ -239,6 +285,10 @@ RETURN collections.contains([1,2,3], "e") AS output; Checks if a list contains all the values from another list. + +This function is equivalent to **apoc.coll.containsAll**. + + {

Input:

} - `coll: List[Any]` ➡ The target list used for searching values. @@ -270,6 +320,10 @@ RETURN collections.contains_all([1, 2, 3, "pero"], [1, 1, 1, 1, 2, 3]) AS contai Returns the unique intersection of two lists. + +This function is equivalent to **apoc.coll.intersection**. + + {

Input:

} - `first: List[Any]` ➡ The first list. @@ -295,6 +349,107 @@ RETURN collections.intersection([1, 1, 2, 3, 4, 5], [1, 1, 3, 5, 7, 9]) AS inter +---------------------------------------------------------+ ``` +### `disjunction()` + +Returns the disjunction (symmetric difference) of two lists: the unique elements +present in exactly one of the lists. The order of the result is not guaranteed. + + +This function is equivalent to **apoc.coll.disjunction**. + + +{

Input:

} + +- `list1: List[Any]` ➡ The first list. +- `list2: List[Any]` ➡ The second list. + +{

Output:

} + +- `List[Any]` ➡ The unique elements found in only one of the two lists. + +{

Usage:

} + +The following query will return the elements present in only one of the lists: + +```cypher +RETURN collections.disjunction([1, 2, 3, 4, 5], [3, 4, 5]) AS disjunction; +``` + +```plaintext ++---------------------------------------------------------+ +| disjunction | ++---------------------------------------------------------+ +| [1, 2] | ++---------------------------------------------------------+ +``` + +### `subtract()` + +Returns the first list as a set with all elements of the second list removed. The +result is deduplicated and its order is not guaranteed. + + +This function is equivalent to **apoc.coll.subtract**. + + +{

Input:

} + +- `list1: List[Any]` ➡ The list to subtract from. +- `list2: List[Any]` ➡ The list of elements to remove. + +{

Output:

} + +- `List[Any]` ➡ The unique elements of the first list that are not present in the second list. + +{

Usage:

} + +The following query will remove the elements of the second list from the first: + +```cypher +RETURN collections.subtract([1, 2, 3, 4, 5, 6, 6], [3, 4, 5]) AS subtracted; +``` + +```plaintext ++---------------------------------------------------------+ +| subtracted | ++---------------------------------------------------------+ +| [1, 2, 6] | ++---------------------------------------------------------+ +``` + +### `duplicates()` + +Returns the values that appear more than once in a list, each reported a single +time, in the order in which the duplicate is first observed. + + +This function is equivalent to **apoc.coll.duplicates**. + + +{

Input:

} + +- `coll: List[Any]` ➡ The input list. + +{

Output:

} + +- `List[Any]` ➡ The values that occur more than once in the input list. + +{

Usage:

} + +The following query will return the values that appear more than once: + +```cypher +RETURN collections.duplicates([1, 1, 2, 3, 3, 3]) AS duplicates; +``` + +```plaintext ++---------------------------------------------------------+ +| duplicates | ++---------------------------------------------------------+ +| [1, 3] | ++---------------------------------------------------------+ +``` + ### `flatten()` Returns flattened list of inputs provided. @@ -468,6 +623,10 @@ RETURN collections.sum([1, 2.3, -4, a.id]) AS sum; Calculates the sum of list elements casted to integers. The initial list elements have to be `Numeric` data type, or an exception is thrown. + +This function is equivalent to **apoc.coll.sumLongs**. + + {

Input:

} - `numbers: List[Any]` ➡ The list of numbers. @@ -498,6 +657,10 @@ Calculates the average of listed elements if they are of the same type and can be summed (the elements need to be numerics). Listing elements of different data types, or data types that are impossible to sum, will throw an exception. + +This function is equivalent to **apoc.coll.avg**. + + {

Input:

} - `numbers: List[Any]` ➡ The list of numbers. @@ -526,6 +689,10 @@ RETURN collections.avg([5, 5, 6, 7, -5]) AS average; The procedure returns the element of the maximum value from the input list. + +This function is equivalent to **apoc.coll.max**. + + {

Input:

} - `values: List[Any]` ➡ The input list where an element of the maximum value must be found. @@ -556,6 +723,10 @@ Finds the element of the minimum value in an input list. Listing elements of different data types, or data types that are impossible to compare, will throw an exception. + +This function is equivalent to **apoc.coll.min**. + + {

Input:

} - `values: List[Any]` ➡ The input list where an element of the minimum value must be found. @@ -588,6 +759,10 @@ Splits the provided list based on a specified delimiter. Returns a series of sublists generated by breaking the original list wherever the delimiter is encountered. The delimiter itself is not included in the resulting sublists. + +This procedure is equivalent to **apoc.coll.split**. + + {

Input:

} - `subgraph: Graph` (**OPTIONAL**) ➡ A specific subgraph, which is an [object of type Graph](/advanced-algorithms/run-algorithms#run-procedures-on-subgraph) returned by the `project()` function, on which the algorithm is run. @@ -660,4 +835,4 @@ RETURN result; +---------------------------------------------------------+ | [5,6] | +---------------------------------------------------------+ -``` \ No newline at end of file +``` From 2b6f7711f344e5432ab1122fb85882ecdb8d45f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Milinovi=C4=87?= <44698587+imilinovic@users.noreply.github.com> Date: Wed, 29 Jul 2026 13:42:07 +0200 Subject: [PATCH 8/9] feat: document text.compare_cleaned function (#1691) --- .../available-algorithms.mdx | 1 + .../available-algorithms/text.mdx | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index 83c873129..c648e57db 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -225,6 +225,7 @@ Running `SHOW QUERY CALLABLE MAPPINGS` requires the `CONFIG` privilege. | apoc.text.format | Formats strings using the C++ fmt library | [text.format()](/advanced-algorithms/available-algorithms/text#format) | | apoc.text.replace | Replaces substrings matching regex with replacement | [text.replace()](/advanced-algorithms/available-algorithms/text#replace) | | apoc.text.regReplace | Replaces substrings matching regex with replacement | [text.regReplace()](/advanced-algorithms/available-algorithms/text#regreplace) | +| apoc.text.compareCleaned | Compares two strings for equality after normalization | [text.compare_cleaned()](/advanced-algorithms/available-algorithms/text#compare_cleaned) | | apoc.util.md5 | Gets MD5 hash of concatenated string representations | [util_module.md5()](/advanced-algorithms/available-algorithms/util_module#md5) | | apoc.util.validatePredicate | Raises exception if predicate yields true with parameter interpolation | [mgps.validate_predicate()](/advanced-algorithms/available-algorithms/mgps#validate_predicate) | | db.awaitIndexes | No-op compatibility shim for clients that wait for index creation (e.g. the Neo4j Spark connector) | [mgps.await_indexes()](/advanced-algorithms/available-algorithms/mgps#await_indexes) | diff --git a/pages/advanced-algorithms/available-algorithms/text.mdx b/pages/advanced-algorithms/available-algorithms/text.mdx index 2966458bb..131ca5439 100644 --- a/pages/advanced-algorithms/available-algorithms/text.mdx +++ b/pages/advanced-algorithms/available-algorithms/text.mdx @@ -297,3 +297,46 @@ Result: | 1 | +--------+ ``` + +### `compare_cleaned()` + +Compares two strings for equality after normalizing each one: keeping only ASCII +letters and digits, converting them to lowercase, and dropping everything else +(accents, punctuation, whitespace, and non-ASCII characters). + + +This function is equivalent to **apoc.text.compareCleaned**. + + + +Normalization is limited to ASCII and performs no Unicode folding, so accented +and non-ASCII letters are dropped rather than reduced to a base letter. For +example, `café` cleans to `caf` and is therefore not equal to `cafe`. + + +{

Input:

} + +- `text1: string` ➡ The first string to normalize and compare. A `null` value results in `false`. +- `text2: string` ➡ The second string to normalize and compare. A `null` value results in `false`. + +{

Output:

} + +- `boolean` ➡ `true` if the two normalized strings are equal, and `false` otherwise. + +{

Usage:

} + +Use the following query to compare two strings while ignoring case and punctuation: + +```cypher +RETURN text.compare_cleaned("Hello, World!", "hello world") AS result; +``` + +Result: + +```plaintext ++--------+ +| result | ++--------+ +| true | ++--------+ +``` From 3ad21aa955b04d19f7484d195e4606097b50cd74 Mon Sep 17 00:00:00 2001 From: Vlasta Date: Wed, 29 Jul 2026 16:48:20 +0200 Subject: [PATCH 9/9] Add Memgraph v3.13.0 release notes changelog entries. Co-authored-by: Cursor --- pages/release-notes.mdx | 113 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/pages/release-notes.mdx b/pages/release-notes.mdx index e12028e7e..e01e0d244 100644 --- a/pages/release-notes.mdx +++ b/pages/release-notes.mdx @@ -48,6 +48,119 @@ guide. ### Memgraph v3.13.0 - September 9th, 2026 +{

⚠️ Breaking changes

} + +- The APOC compatibility names `apoc.convert.fromJsonList` and + `apoc.convert.toJson` now resolve to the C++ `convert` module + (`convert.from_json_list` / `convert.to_json`) instead of the Python + `json_util` implementations. Output can differ — especially for nodes, + relationships, paths, points, and temporals. Call `json_util.*` explicitly if + you need the previous Python behavior, or update consumers for the new + structured / ISO-8601 JSON forms. + [#4443](https://github.com/memgraph/memgraph/pull/4443) + +{

🐞 Bug fixes

} + +- Text and vector search now respect fine-grained label and property + permissions. Hits the caller cannot read are filtered out, and + `text_search.aggregate` / `text_search.aggregate_edges` return an error unless + every indexed property is readable. + [#4316](https://github.com/memgraph/memgraph/pull/4316) +- Fixed unbounded memory growth from the query AST cache when many + structurally unique queries were run (for example streams of inlined + embeddings). The cache is now a bounded LRU controlled by + `--query-ast-cache-max-size` (default `1000`; `0` disables it). + [#4334](https://github.com/memgraph/memgraph/pull/4334) +- The `collections.*` functions and procedures now accept `NULL` list and scalar + arguments instead of failing argument validation. Each function returns a + defined result (for example `collections.sum(null)` → `null`, + `collections.sort(null)` → `[]`, `collections.contains(null, x)` → `false`), + matching the compatibility-layer behavior. + [#4416](https://github.com/memgraph/memgraph/pull/4416) +- Fixed stale coordinator entries in the HA routing table and a possible + coordinator crash on `REMOVE COORDINATOR`. Coordinators now deduplicate + entries when applying Raft logs and snapshots. + [#4444](https://github.com/memgraph/memgraph/pull/4444) +- Fixed `path.subgraph_all` and `path.subgraph_nodes` so their config options + work as expected. + [#4447](https://github.com/memgraph/memgraph/pull/4447) +- Under heavy concurrent load, operations that need exclusive access to the + database could hang indefinitely while shared readers kept arriving. Those + exclusive waiters now take priority so the hang no longer happens. + [#4450](https://github.com/memgraph/memgraph/pull/4450) +- Fixed a crash when `LOAD PARQUET` hit invalid values (for example a time + outside Memgraph’s supported range). The query now fails with an error + instead of taking down the server. + [#4454](https://github.com/memgraph/memgraph/pull/4454) +- Fixed `LOAD PARQUET` silently storing wrong timestamps or durations when + converting large temporal values from Parquet. Those cases now fail with a + clear query error instead of corrupting data. + [#4455](https://github.com/memgraph/memgraph/pull/4455) +- Fixed a rare crash in garbage collection under heavy concurrent writes when + indexes or unique constraints are defined. + [#4475](https://github.com/memgraph/memgraph/pull/4475) +- Fixed a crash when multiple sessions printed query plans at the same time + (for example concurrent `EXPLAIN` / `PROFILE`, or query-plan logging). + [#4489](https://github.com/memgraph/memgraph/pull/4489) + +{

🛠️ Improvements

} + +- MAGE is now built and packaged from the same unified CMake / Conan tree as + Memgraph. Build it with `build.sh --mage on` or `--mage only`; the old + `mage/setup` Python script is removed. Only affects people building MAGE from + source — prebuilt packages are unchanged. + [#4348](https://github.com/memgraph/memgraph/pull/4348) +- `build.sh --target` now accepts several targets in one invocation (for + example `--target memgraph memgraph__unit`), so you can build multiple + targets with a single configure step instead of one run per target. + [#4404](https://github.com/memgraph/memgraph/pull/4404) +- Reduced memory used by the query abstract syntax tree and plan caches by + storing each LRU cache key once instead of twice per entry. + [#4445](https://github.com/memgraph/memgraph/pull/4445) +- Queries that use query-module functions or `CALL` procedures are now + plan-cached instead of being re-parsed and re-planned on every run. Module + reloads stay safe; only module-dependent queries are invalidated, and the + next execution picks up updated code. + [#4461](https://github.com/memgraph/memgraph/pull/4461) + [#4482](https://github.com/memgraph/memgraph/pull/4482) +- In in-memory transactional mode, `CREATE INDEX` / `CREATE CONSTRAINT` no + longer stall behind garbage collection (and GC no longer waits on those DDL + statements). Under index-heavy workloads this removes GC-correlated latency + spikes on index and constraint creation. + [#4468](https://github.com/memgraph/memgraph/pull/4468) + +{

✨ New features

} + +- Added `collections.disjunction`, `collections.subtract`, and + `collections.duplicates` to the MAGE `collections` module for set-style list + difference, subtraction, and finding repeated values. + [#4415](https://github.com/memgraph/memgraph/pull/4415) +- Added `map.get` and `map.merge_list` to the MAGE `map` module. Existing + helpers such as `map.merge` and `map.set_key` now treat a `null` map as empty + (and a `null` key as a no-op) instead of failing, and accept nodes or + relationships by using their property maps. + [#4417](https://github.com/memgraph/memgraph/pull/4417) +- Added `text.compare_cleaned(text1, text2)` to the MAGE `text` module. It + compares two strings for equality after keeping only ASCII letters and digits + (lowercased) and dropping everything else; `NULL` arguments return `false`. + [#4435](https://github.com/memgraph/memgraph/pull/4435) +- Added `convert.from_json_map`, `convert.from_json_list`, `convert.to_map`, and + `convert.to_json` for parsing and serializing JSON, with an optional `path` + selector on the from_* helpers and structured output for graph and temporal + types from `to_json`. + [#4443](https://github.com/memgraph/memgraph/pull/4443) +- Added `search.node` and `search.node_all` procedures that find nodes by a + `{label: property}` map, a comparison operator, and a value. A property list + per label is OR-ed; `search.node` de-duplicates by node while + `search.node_all` keeps duplicates. An existing label-property index is used + automatically when available. + [#4460](https://github.com/memgraph/memgraph/pull/4460) +- `--coordinator-id=0` is now a valid coordinator id (previously rejected). + [#4483](https://github.com/memgraph/memgraph/pull/4483) +- `CREATE RANGE INDEX FOR ... ON ...` now works for nodes and relationships and + creates Memgraph’s usual property index. + [#4486](https://github.com/memgraph/memgraph/pull/4486) + ### Lab v3.13.0 - September 9th, 2026