-
Notifications
You must be signed in to change notification settings - Fork 39
Update page for 51N65 #451
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
Open
Lojjs
wants to merge
3
commits into
neo4j:dev
Choose a base branch
from
Lojjs:update-51N65
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,73 @@ | ||||||||
| = 51N65 | ||||||||
|
|
||||||||
| == Status description | ||||||||
| error: system configuration or operation exception - vector index dimensionality mismatch. Vector index `{ <<idx>> }` has a dimensionality of `{ <<dim>>1 }`, but indexed vectors have `{ $dim2 }`. | ||||||||
| error: system configuration or operation exception - vector index dimensionality mismatch. Vector index `{ <<idx>> }` has a configured dimensionality of `{ <<dim>>1 }`, but the provided vector has a dimension `{ <<dim>>2 }`. | ||||||||
|
|
||||||||
| == Example scenario | ||||||||
| For example, given that you have created the following vector index: | ||||||||
|
|
||||||||
| [source,cypher] | ||||||||
| ---- | ||||||||
| CREATE VECTOR INDEX indexName | ||||||||
| FOR (n: Label) ON n.prop | ||||||||
| OPTIONS { | ||||||||
| indexConfig: {`vector.dimensions`: 1048} | ||||||||
| } | ||||||||
| ---- | ||||||||
|
|
||||||||
| When querying it with a vector with a dimension other than 1048: | ||||||||
|
|
||||||||
| [source,cypher] | ||||||||
| ---- | ||||||||
| CYPHER 25 | ||||||||
| MATCH (n) | ||||||||
| SEARCH n IN ( | ||||||||
| VECTOR INDEX indexName | ||||||||
| FOR vector([1, 2, 3], 3, INTEGER) | ||||||||
| LIMIT 5 | ||||||||
| ) | ||||||||
| RETURN n | ||||||||
| ---- | ||||||||
|
|
||||||||
| or | ||||||||
|
|
||||||||
| [source,cypher] | ||||||||
| ---- | ||||||||
| CALL db.index.vector.queryNodes('indexName', 5, [1, 2, 3]) | ||||||||
| ---- | ||||||||
|
|
||||||||
| You will receive an error with GQLSTATUS 51N65 and a status description: | ||||||||
|
|
||||||||
| [source] | ||||||||
| ---- | ||||||||
| error: system configuration or operation exception - vector index dimensionality mismatch. Vector index `indexName` has a configured dimensionality of 1048, but the provided vector has dimension 3. | ||||||||
| ---- | ||||||||
|
|
||||||||
| == Possible solution | ||||||||
|
|
||||||||
| If you want to store and query vectors of varying dimensions in the same vector index, it cannot have a configured dimension. | ||||||||
| For example: | ||||||||
|
|
||||||||
| . Drop the index you want to change the configuration of: | ||||||||
| + | ||||||||
| [source,cypher] | ||||||||
| ---- | ||||||||
| DROP INDEX indexName | ||||||||
| ---- | ||||||||
|
|
||||||||
| . Recreate the index without the configured dimension: | ||||||||
| + | ||||||||
| [source,cypher] | ||||||||
| ---- | ||||||||
| CREATE VECTOR INDEX indexName | ||||||||
| FOR (n: Label) ON n.prop | ||||||||
| ---- | ||||||||
|
|
||||||||
| [NOTE] | ||||||||
| ==== | ||||||||
| It is recommended to configure dimensions when creating a vector index. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't find it in the operations manual to see the context, but I like your suggestion. Maybe something like this:
Suggested change
|
||||||||
| For most use cases, you would instead want to query the index with only vectors of dimension 1048. | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| ==== | ||||||||
|
|
||||||||
| ifndef::backend-pdf[] | ||||||||
| [discrete.glossary] | ||||||||
|
|
||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understand the note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a note which I stole from the operations manual. So depending on what the user aimed to do with the failing query, the solution to the error might be to not configure dimensions for the index. But they should be aware that we generally recommend to configure dimensions unless you have that specific usecase with vectors of mixed dimensions.
Something like that. Do you think I should rephrase it to make it more clear that it is kind of a warning/caveat to the proposed solution or should we remove the note you think?