Right now, we are using mangodb 1.2.2 to create a database and store value. Our data types look like this:
"file": "1", "tools": {"foo": {"status": "pending"}} "file": "" "{" Status ":" pending "}}" file ":" 3 "," tools ": {" foo ": {" status ":" running "}} "" "": "" "" Status ":" full "}}" file ":" 5 "," tool ": {" foo ": {" status ": "Done"}} We want to query for each single which contains {"status": "pending"}. We do not want to use the {"tools.foo.status": "pending"} because we have many different variations in addition to foo and bar. To clarify, we want to do something like this { "tools. "Status": "Pending"}
No, you can not do that I'm scared That is, you have to maintain your own index for this, for every insert / update in the file archive, upset one in the file_status_index archive to update the current state.
Step is the process: To get the ID, first query the index archive, and then get the actual data Issue the $ in query in the file code. P> It may look scary, but this is the price you have to pay with this schema.
Comments
Post a Comment