-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
What is the best way for us to represent documents like the following in Ruby, Python, PHP, etc.
db.posts.find( { keywords :
{ $in : ["a", "b"] }, keywords :
{ $in : ["c, d"] }} )
Options:
Use a JSON string.
Create a hash/dict subclass that allows duplicates.
Come up with some other way of writing this in a dictionary: { $dup: { key: "keywords", values: [
,
{ $in: [ "c", "d" ] }] } }
- either translate at the driver level or support this in the server.