PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 19th of March, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[11:03:25] <pandaadb> Hi - I am wondering if on mongo there is a way to have a unique set? I have document that contain an array field "test" that has a few keywords. I'd like to have this field unique across the collection where 2 sets ["a", "b"] and ["a", "c"] are not unique because they don't have all identical keywords
[11:03:45] <pandaadb> the unique index on the set currently works differently, where the word "a" will cause a duplicate key error
[11:13:42] <pandaadb> the only way i could see was to use a string field, "a b" and have a text index. That also does not behave the way i expect it to. A normal unique index on that field will, but ignores word stemming etc