Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-to/databases-and-queries.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Notes on the script:
* A relative path such as `./mydb` is taken from the current directory of your program (`os.getcwd()`) at the time of the call, so it follows `os.chdir`. A `DatabaseFactory` and a server (`root_path`) keep the directory that was current when you made them. `db.get_database_path()` and the error messages show the absolute path: `/path/to/workdir` in the output above stands for the directory the script ran in.
* `open_or_create_database(path)` opens the database when it exists and creates it when it does not, so a script that keeps its data in one database runs the same way the first time and every time after. See <<open-or-create>>.
* `with` closes the database when the block ends, also when an exception leaves it. On close, active transactions roll back. You can call `db.close()` yourself, inside `try`/`finally`, but the context manager is the recommended way.
* `db.drop()` deletes all files of the database. It cannot be undone.
* `db.drop()` closes the database and deletes all its files. It cannot be undone. From engine 26.12.1, it raises `ArcadeDBError` when a file could not be deleted, for example one that another process holds open on Windows. The database is closed then too, and the files that were not deleted stay on disk.
* `db.is_transaction_active()` is `True` only inside `with db.transaction():` (or between `begin()` and `commit()` or `rollback()`). The other ways to end a transaction, and what an error does to it, are on xref:how-to/transactions.adoc[Transactions].

[#open-or-create]
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-to/errors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ A code that the table does not know is not an empty answer: `e.code` is `unknown
== The codes

// REMOVE WHEN: ArcadeData/arcadedb-python#544 merges; it gives these subclasses rows of their own.
One row for each code. A row with more than one engine exception matches any of them. The engine exception is matched by its Java class name, and the name must be the same: a subclass of a listed exception that has no row of its own, for example `RecordVetoedException` (a `ValidationException`) or `DatabaseIsReopeningException` (a `DatabaseIsClosedException`), gets the code `unknown` unless a rule on its text matches (https://github.com/ArcadeData/arcadedb-python/issues/507[#507]). A failure that the Python layer raises itself, or that one package words differently, is matched by its text, after the rows that match a class. The first row that matches decides.
One row for each code. A row with more than one engine exception matches any of them. The engine exception is matched by its Java class name, and the name must be the same: a subclass of a listed exception that has no row of its own, for example `RecordVetoedException` (a `ValidationException`) or `DatabaseIsReopeningException` (a `DatabaseIsClosedException`), or, from engine 26.12.1, `IndexDropFailedException` and `ConstraintDropFailedException` (both a `SchemaException`, raised by an openCypher `DROP INDEX` or `DROP CONSTRAINT` of a name that does not exist), gets the code `unknown` unless a rule on its text matches (https://github.com/ArcadeData/arcadedb-python/issues/507[#507]). A failure that the Python layer raises itself, or that one package words differently, is matched by its text, after the rows that match a class. The first row that matches decides.

[cols="2,2,3,5"]
|===
Expand Down
28 changes: 28 additions & 0 deletions docs/modules/ROOT/pages/how-to/vectors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,34 @@ refused: True
refused: True
----

[[graph-parameter-limits]]
=== The limits of the graph parameters

From engine 26.12.1, a new `LSM_VECTOR` index is refused with `ArcadeDBError` when it declares a graph parameter above its limit. The engine added the limits on 2026-11-29, so a pre-release of 26.12.1 built before that day does not have them. They hold for `create_vector_index`, for the `METADATA` of SQL `CREATE INDEX`, and for the options of openCypher `CREATE VECTOR INDEX`.

[cols="2,2,1"]
|===
| `create_vector_index` | `METADATA` | Largest value

| `max_connections`
| `maxConnections`
| 2,048

| `beam_width`
| `beamWidth`
| 10,000

| -
| `neighborOverflowFactor`
| 100

| -
| `alphaDiversityRelaxation`
| 100
|===

No setting raises these limits. They are far above the useful values: the engine gives 16 to 64 connections, a beam of 50 to 500, and factors of 1.0 to 1.5 as typical. An index that is already stored with a larger value keeps opening and keeps working.

== Insert vectors

A vector is a property value like any other. Bind it as a parameter of `INSERT`. A NumPy `float32` array crosses into the engine as one buffer. A list of Python floats also works, and a list that is the only parameter of a statement is read as the whole parameter list, so give a vector as a list only next to other parameters or by name. The details are in xref:how-to/databases-and-queries.adoc#a-query-vector[A query vector].
Expand Down
3 changes: 3 additions & 0 deletions docs/modules/ROOT/pages/upgrading.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ The engine that the 26.12.1 packages carry changes some behaviour that the other

* A vector index that `CREATE INDEX ... LSM_VECTOR` makes without `addHierarchy` has the HNSW hierarchy layers; on 26.11.1 and earlier it was a flat graph. `create_vector_index` already asked for the layers. See xref:how-to/vectors.adoc[Vectors].
* A new `LSM_VECTOR` index with more than 16,384 dimensions is refused, and so is the first vector of that length in an index that takes its dimensions from it. To create a wider index, first run `+ALTER DATABASE `arcadedb.vectorIndex.maxDimensions` 20000+`, with the number that your vectors need. An index that is already stored keeps working. See xref:how-to/vectors.adoc#dimension-limit[The dimension limit].
* A new `LSM_VECTOR` index is also refused when it declares `max_connections` (`maxConnections`) above 2,048, `beam_width` (`beamWidth`) above 10,000, or `neighborOverflowFactor` or `alphaDiversityRelaxation` above 100. No setting raises these limits. An index that is already stored with a larger value keeps working. See xref:how-to/vectors.adoc#graph-parameter-limits[The limits of the graph parameters].
* `EXPORT DATABASE` refuses a setting that it does not know and some values that it accepted before: see xref:how-to/import-export.adoc[Importing and exporting data].
* `db.drop()` raises `ArcadeDBError` when the engine could not delete every file of the database, for example a file that another process holds open on Windows. Before, the engine logged a warning and `drop()` returned. In both cases the database is closed and the files that were not deleted stay on disk.
* An openCypher `DROP INDEX` or `DROP CONSTRAINT` of a name that does not exist, without `IF EXISTS`, fails with the code `unknown`, where 26.11.1 gave `schema` (`SchemaError`). The engine now raises `IndexDropFailedException` or `ConstraintDropFailedException`, and the error table has no row for them yet (https://github.com/ArcadeData/arcadedb-python/issues/507[#507]). `except ArcadeDBError` still catches the error, `except SchemaError` does not. SQL `DROP INDEX` is unchanged. See xref:how-to/errors.adoc[Errors: codes, hints and classes].

Keep a backup of the database directory before you upgrade. With the engine change https://github.com/ArcadeData/arcadedb/pull/12239[ArcadeData/arcadedb#12239], a read-write open labels the database, and 26.11.1 then refuses to open it. The way to prevent the label is on xref:installation.adoc#older-wheel[Open a database with an older wheel].

Expand Down