I want to create an index on 4 properties of my User
type.
Below is my query which I’m trying to run. It failed both through the js client and RedisInsight:
GRAPH.QUERY social "CREATE INDEX FOR (u:User) ON (u.id, u,username, u.firstname, u.lastname)"
This is the error message I’m getting:
"errMsg: Invalid input 'F': expected '=' or CREATE INDEX ON line: 1, column: 14, offset: 13 errCtx: CREATE INDEX FOR (u:User) ON (u.id, u,username, u.firstname, u.lastname) errCtxOffset: 13"
The error indicates the the CREATE INDEX FOR
statement is not being recognized but instead it suggests CREATE INDEX ON
even though in the docs it is marked as deprecated.
I run Redisgraph through docker compose
and also the latest
image.
redisgraph:
image: redislabs/redisgraph:latest
container_name: redisgraph
networks:
- basenet
volumes:
- ./docker-data/redisgraph:/data
ports:
- 6379:6379
restart: on-failure