Reputation: 3666
I am using AWS' Redis MemoryDB 7 Preview with Vector Search enabled. The following queries fail for me with a strange error:
# create an index
FT.CREATE idx ON JSON SCHEMA $.title AS title TEXT
# add a document
JSON.SET doc $ '{"title":"hello"}'
# search for the document
FT.SEARCH idx "@title:hello"
This fails with the following error:
(error) ERR Parse error at 0 Unexpected `@` Expected whitespaces
However FT.SEARCH idx *
works fine. I have tried setting export TERM=dumb
because I thought that the terminal is escaping some characters incorrectly.
The Redis Engine on the MemoryDB is 7.1, my redis-cli
7.2.3.
Upvotes: 1
Views: 305
Reputation: 11
As best I can tell, MemoryDB does not support text search. While it doesn't say so explicitly, their documentation only details wildcard, numeric, tag, and vector search.
In your case, if you only need exact on the title field, the following should work:
# create an index
FT.CREATE idx ON JSON SCHEMA $.title AS title TAG
# add a document
JSON.SET doc $ '{"title":"hello"}'
# search for the document
FT.SEARCH idx "@title:{ hello }"
Upvotes: 1