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

normalized: false cause invalid redis FT.CREATE command #25

Open
UrielCh opened this issue Aug 20, 2022 · 0 comments
Open

normalized: false cause invalid redis FT.CREATE command #25

UrielCh opened this issue Aug 20, 2022 · 0 comments

Comments

@UrielCh
Copy link

UrielCh commented Aug 20, 2022

I'm trying Redis search / Redis OM for the first time.
I found a strange behavior In this nestJS project currently on branch Redis.

During my test I got the Error:
[ErrorReply: Invalid field type for field `UNF`]
With no stack and no mention to Redis.

After investigation, the error occurred when I call createIndex, if I set a normalized: false in my model.

In my case the faulty generated create index request was:

FT.CREATE 
  DroidUser:index 
  ON JSON 
  PREFIX 1 DroidUser: 
  SCHEMA
  $.createdAt AS createdAt NUMERIC NOINDEX
  $.updatedAt AS updatedAt NUMERIC NOINDEX
  $.email AS email TAG SEPARATOR | UNF
  $.hash AS hash TAG SEPARATOR | NOINDEX
  $.name AS name TAG SEPARATOR | NOINDEX
  $.role AS role TAG SEPARATOR | 
  $.devices[*] AS devices TAG SEPARATOR | 
  $.tokens[*] AS tokens TAG SEPARATOR | 

so:

  • can an error occurring during the create index can be more verbose ?
  • can you properly handle normalized: false?

In my case I want to set normalized to true, so my RedisOM test is still on track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant