-
Notifications
You must be signed in to change notification settings - Fork 79
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
Contains only searches inside string[] & List<string>() NOT HashSet<string>() #181
Comments
Have you confirmed that the index has those list and hashset fields defined in it? I spent hours the other days trying to figure out why the search didn't work and turn out I had to delete and recreate the index to reflect the change from the ORM. |
Yeah. I was getting no results back using |
Right, so List and string[] should both work, only reason I'd think to keep a hash-set out is that the data-type in Redis is not going to be a set, it's a going to be a JSON array, so the unordered/non-duplication policies of a hash-set will not be enforceable. |
@slorello89 Except that they will be enforced once the model is loaded and if it's resaved, any duplicates are automatically removed. Which is the effect I was going for. I think it should be indexed in addition to the |
@slorello89 Bumped into this again the other day. I'm expecting a Can we add EDIT: If we can target |
Hello @slorello89
Looking at the following example:
This only works if the underlying type is string[]. Can we add List, and HashSet as acceptable types for this logic as well?
UPDATE: Tested and working with both List(), and HashSet(), but ONLY when I create the index as string[]. I.e. changing to this type got things working, then as I went back to test List and HashSet, both would still return results.
Once I reindex as Hashset, I lost functionality.
Once I reindex as List or string[] I get functionality back.
So since it looks like I can get data back with my model as HashSet, maybe the issue is just in the index creation?
The text was updated successfully, but these errors were encountered: