Skip to content

Commit a6fba7a

Browse files
meistermeiermichael-simons
authored andcommitted
GH-26 - Add support for Neo4j vector index.
This commit brings support for Neo4j graph database in general, and uses the vector index functionality available since version 5.11. Aligned with the existing PgVector store and its tests. The module creates indexes, if needed, for the vector search and the identifier of the document object. Add neo4j to vectordb docs page Co-authored-by: Michael Simons <[email protected]>
1 parent 92773f1 commit a6fba7a

File tree

5 files changed

+634
-2
lines changed

5 files changed

+634
-2
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<module>spring-ai-docs</module>
2222
<module>vector-stores/spring-ai-pgvector-store</module>
2323
<module>vector-stores/spring-ai-milvus-store</module>
24+
<module>vector-stores/spring-ai-neo4j-store</module>
2425
</modules>
2526

2627
<organization>

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ The `VectorStore` implementations supported by Spring AI are:
5353

5454
* InMemoryVectorStore
5555
* SimplePersistentVectorStore
56-
* PgVector - A Vector Store build on https://github.com/pgvector/pgvector[PostgreSQL/PGVector].
57-
* Milvus - A Vector Store build on https://milvus.io/[Milvus]
56+
* PgVector - The Vector Store https://github.com/pgvector/pgvector[PostgreSQL/PGVector].
57+
* Milvus - The Vector Store https://milvus.io/[Milvus]
58+
* Neo4j - The Vector Store https://neo4j.com/[Neo4j]
5859

5960
More are implementations are coming, with Pinecone being the next implementation.
6061

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.experimental.ai</groupId>
7+
<artifactId>spring-ai</artifactId>
8+
<version>0.2.0-SNAPSHOT</version>
9+
<relativePath>../../pom.xml</relativePath>
10+
</parent>
11+
<artifactId>spring-ai-neo4j-store</artifactId>
12+
<packaging>jar</packaging>
13+
<name>Spring AI Vector Store - neo4j</name>
14+
<description>Spring AI Neo4j Vector Store</description>
15+
<url>https://github.com/spring-projects-experimental/spring-ai</url>
16+
17+
<scm>
18+
<url>https://github.com/spring-projects-experimental/spring-ai</url>
19+
<connection>git://github.com/spring-projects-experimental/spring-ai.git</connection>
20+
<developerConnection>[email protected]:spring-projects-experimental/spring-ai.git</developerConnection>
21+
</scm>
22+
23+
<properties>
24+
<spring-ai.version>0.2.0-SNAPSHOT</spring-ai.version>
25+
<!-- testing -->
26+
<testcontainers.version>1.19.0</testcontainers.version>
27+
</properties>
28+
29+
<dependencies>
30+
<dependency>
31+
<groupId>org.springframework.experimental.ai</groupId>
32+
<artifactId>spring-ai-core</artifactId>
33+
<version>${spring-ai.version}</version>
34+
</dependency>
35+
36+
<dependency>
37+
<groupId>org.neo4j.driver</groupId>
38+
<artifactId>neo4j-java-driver</artifactId>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>org.neo4j</groupId>
43+
<artifactId>neo4j-cypher-dsl-schema-name-support</artifactId>
44+
<version>2023.7.0</version>
45+
</dependency>
46+
47+
<!-- TESTING -->
48+
<dependency>
49+
<groupId>org.springframework.experimental.ai</groupId>
50+
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
51+
<version>${spring-ai.version}</version>
52+
<scope>test</scope>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>org.springframework.boot</groupId>
57+
<artifactId>spring-boot-starter-test</artifactId>
58+
<scope>test</scope>
59+
</dependency>
60+
61+
<dependency>
62+
<groupId>org.testcontainers</groupId>
63+
<artifactId>neo4j</artifactId>
64+
<version>${testcontainers.version}</version>
65+
<scope>test</scope>
66+
</dependency>
67+
68+
<dependency>
69+
<groupId>org.testcontainers</groupId>
70+
<artifactId>junit-jupiter</artifactId>
71+
<version>${testcontainers.version}</version>
72+
<scope>test</scope>
73+
</dependency>
74+
75+
76+
</dependencies>
77+
78+
</project>

0 commit comments

Comments
 (0)