Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccaf8bc

Browse files
authored
feat(neo4j): KEY constraint -> UNIQUE, to support community edition (#983)
1 parent 7bf4516 commit ccaf8bc

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

dev/neo4j.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: cocoindex-neo4j
1+
name: cocoindex-neo4j-community
22
services:
33
neo4j:
4-
image: neo4j:5-enterprise
4+
image: neo4j:2025.08-community-ubi9
55
volumes:
6-
- /$HOME/neo4j/logs:/logs
7-
- /$HOME/neo4j/config:/config
8-
- /$HOME/neo4j/data:/data
9-
- /$HOME/neo4j/plugins:/plugins
6+
- /$HOME/neo4j/community/logs:/logs
7+
- /$HOME/neo4j/community/config:/config
8+
- /$HOME/neo4j/community/data:/data
9+
- /$HOME/neo4j/community/plugins:/plugins
1010
environment:
1111
- NEO4J_AUTH=neo4j/cocoindex
1212
- NEO4J_PLUGINS='["graph-data-science"]'
13-
- NEO4J_ACCEPT_LICENSE_AGREEMENT=eval
1413

1514
# Uncomment to enable query logging
1615
# - NEO4J_db_logs_query_enabled=VERBOSE

docs/docs/ops/targets.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,6 @@ docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoi
442442
This will bring up a Neo4j instance, which can be accessed by username `neo4j` and password `cocoindex`.
443443
You can access the Neo4j browser at [http://localhost:7474](http://localhost:7474).
444444

445-
:::warning
446-
447-
The docker compose config above will start a Neo4j Enterprise instance under the [Evaluation License](https://neo4j.com/terms/enterprise_us/),
448-
with 30 days trial period.
449-
Please read and agree the license before starting the instance.
450-
451-
:::
452-
453-
454445
### Kuzu
455446

456447
#### Spec
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

src/ops/targets/neo4j.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,8 @@ impl components::SetupOperator for SetupComponentOperator {
739739
let matcher = state.object_label.matcher(qualifier);
740740
let query = neo4rs::query(&match &state.index_def {
741741
IndexDef::KeyConstraint { field_names } => {
742-
let key_type = match &state.object_label {
743-
ElementType::Node(_) => "NODE",
744-
ElementType::Relationship(_) => "RELATIONSHIP",
745-
};
746742
format!(
747-
"CREATE CONSTRAINT {name} IF NOT EXISTS FOR {matcher} REQUIRE {field_names} IS {key_type} KEY",
743+
"CREATE CONSTRAINT {name} IF NOT EXISTS FOR {matcher} REQUIRE {field_names} IS UNIQUE",
748744
name = key.name,
749745
field_names = build_composite_field_names(qualifier, field_names),
750746
)

0 commit comments

Comments
 (0)