Skip to content
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

Support for Vector indexes #756

Open
mariusconjeaud opened this issue Oct 12, 2023 · 2 comments
Open

Support for Vector indexes #756

mariusconjeaud opened this issue Oct 12, 2023 · 2 comments
Milestone

Comments

@mariusconjeaud
Copy link
Collaborator

Neo4j added a new type of index in version 5.11 : Vector index

It comes with a set of commands to query it.

But it is still in beta mode, so the set of commands are subject to change, so I suggest we hold off a bit before adding support for this new index type ; but happy to debate.

@CyrusOfEden
Copy link

I might just take a stab at this over the holidays. Any tips?

@mariusconjeaud
Copy link
Collaborator Author

So, the _install_node / _install_relationship are the ones where the magic happens (if a node has an index property, it will create an index.

A few tricks here though :

  • We must pass an extra property to mention the type of index we want to create (so we create a vector and not the default range index)
  • We must check that the Neo4j version is right to create vector indexes. There are utility methods and examples for this, like : if self.version_is_higher_than("5.7")

An underlying question is that we should provide a way to make neomodel query using vector indexes, since it's a specific syntax in Cypher (something like CALL db.index.vector.queryNodes) and returns a list of elements with a similarity score. So that would require a separate method I guess ?

@mariusconjeaud mariusconjeaud added this to the 5.3.2 milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants