Skip to content

Fix indexing and querying GUID lists #403

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

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

Espleth
Copy link
Contributor

@Espleth Espleth commented Aug 6, 2023

There is a problem when using [Indexed] List<Guid> right now - index for them is not created, and querying is not working. This will fix this.
However, as I can see right now, current aprroach is quite bad - you have to manually add new types and it's possible to forget to add it in one place or another.
And I had to spend a few hours to find out, why List<Guid> is not working, there was no indication from RedisOM that I'm doing something wrong.

Also, you probably can't cover all types, that can be indexed: user can use for indexing any signle-line field (DateTime, DateTimeOffset, Enum, Uri, and the list goes on, not to mention it's possible to create custom types). All these types can be serialized as valid JSON single-line fields (string or number)
So, you need to check not the base type, but the JSON-serialized type of the object (with JsonConverter attribute, if it's there). This seems to be a complex task, so I'll leave it to you =)

@Espleth
Copy link
Contributor Author

Espleth commented Aug 6, 2023

Also, the Collection type might be, for example, HashSet, or other ICollection, so current approach of detection collections is bad, too.

@slorello89 slorello89 merged commit 13b0143 into redis:main Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants