diff --git a/pages/advanced-algorithms/available-algorithms.mdx b/pages/advanced-algorithms/available-algorithms.mdx index 42c55cf34..749aa1ea2 100644 --- a/pages/advanced-algorithms/available-algorithms.mdx +++ b/pages/advanced-algorithms/available-algorithms.mdx @@ -210,4 +210,5 @@ Running `SHOW QUERY CALLABLE MAPPINGS` requires the `CONFIG` privilege. | apoc.text.regReplace | Replaces substrings matching regex with replacement | [text.regReplace()](/advanced-algorithms/available-algorithms/text#regreplace) | | 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) | | apoc.version | Returns the Memgraph server version string | [mgps.version()](/advanced-algorithms/available-algorithms/mgps#version) | diff --git a/pages/advanced-algorithms/available-algorithms/mgps.mdx b/pages/advanced-algorithms/available-algorithms/mgps.mdx index 3cd0e2f3d..9b41c6d66 100644 --- a/pages/advanced-algorithms/available-algorithms/mgps.mdx +++ b/pages/advanced-algorithms/available-algorithms/mgps.mdx @@ -63,6 +63,27 @@ WHERE mgps.validate_predicate(n.age < 0, "Invalid age: %i", [n.age]) RETURN n; ``` +### `await_indexes()` + +A no-op compatibility shim for Neo4j's `db.awaitIndexes`. Some clients +(notably the Neo4j Spark / PySpark connector) call `db.awaitIndexes` +during initialization to block until pending indexes are online. Memgraph +builds indexes synchronously, so there is nothing to wait for — this +procedure exists purely so those clients can connect without changes. + + +This procedure is equivalent to **db.awaitIndexes**. + + +{

Input:

} + +- `seconds: integer` ➡ Accepted for parity with the Neo4j signature. + The value is ignored. + +```Cypher +CALL mgps.await_indexes(300); +``` + ### `version()` Returns the Memgraph server version as a string. Provided as the Memgraph @@ -80,4 +101,4 @@ This function is equivalent to **apoc.version**. ```cypher RETURN mgps.version(); -``` +``` \ No newline at end of file