Skip to content

Document VECTOR type and new vector functions #1299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: cypher-25
Choose a base branch
from

Conversation

JPryce-Aklundh
Copy link
Collaborator

@JPryce-Aklundh JPryce-Aklundh commented Jun 5, 2025

TO-DO:

  • Queries on GenAI procedures page - because I cannot return vector values yet, I have not constructed new queries with the vector() constructor
  • Query results - same reason as above
  • Specify release version (not confirmed)
  • Add entries to Additions page (when release version is specified)

NOT in this PR:

  • Vector type constraints
  • Cypher versions and type access

Copy link
Contributor

@gem-neo4j gem-neo4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, great! :D

@@ -26,7 +27,7 @@ In this example `VECTOR` type value, `[1.05, 0.123, 5]` is the coordinates of th
[NOTE]
The dimensions and the formatting of a `VECTOR` is similar to a xref:values-and-types/lists.adoc[`LIST`] value.
However, unlike `LIST` values which contain elements that can be accessed individually with xref:expressions/list-expressions.adoc[list expressions], all operations on a `VECTOR` must operate on the entire `VECTOR`; it is not possible to access or slice individual dimensions of a `VECTOR` value.
Additionally, a `LIST` cannot contain `VECTOR` values.
Additionally, a `LIST` cannot store `VECTOR` values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neo4j cannot store Lists containing vector values, slight difference


| If a `STRING` is used in `vectorValue`, it must start and end with square brackets (`[]`).
The values inside the brackets must be a number represented in either decimal or scientific notation and must be comma separated.
| `null`, `NaN`, and `Infinity` values are not allowed as elements in the `LIST` used as `vectorValue`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
| `null`, `NaN`, and `Infinity` values are not allowed as elements in the `LIST` used as `vectorValue`.
| `null`, `NaN`, and `Infinity` values are not allowed as coordinate values.

@neo4j-docops-agent
Copy link
Collaborator

Copy link
Contributor

@sherfert sherfert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

[[vector-type]]
== The vector type

The `VECTOR` type is a fixed-length, ordered collection of of numeric coordinate values (`INTEGER` or `FLOAT`) stored as a single unit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `VECTOR` type is a fixed-length, ordered collection of of numeric coordinate values (`INTEGER` or `FLOAT`) stored as a single unit.
The `VECTOR` type is a fixed-length, ordered collection of numeric coordinate values (`INTEGER` or `FLOAT`) stored as a single unit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants