mongodb-query
Get n-th element of an array in MongoDB
As part of my document in MongoDB I\'m storing an array of objects. How can I query it for only the 4th element of the array for exampl开发者_如何学运维e? So I don\'t want the get the entire array out[详细]
2023-03-31 14:09 分类:问答How to remove a field completely from a MongoDB document?
{ name: \'book\', tags: { words: [\'abc\',\'123\'], lat: 33, long: 22 } } Suppose this is a document. How do I remove \"words\" completely f开发者_运维百科rom all the documents in this collection?[详细]
2023-03-23 04:41 分类:问答Querying internal array size in MongoDB
Consider a MongoDB document in users collection: { username : \'Alex\', tags: [\'C#\', \'Java\', \'C++\'] }[详细]
2023-03-21 00:50 分类:问答MongoDB: Combine data from multiple collections into one..how?
How can I (in MongoDB) combine data from multiple collections into one collection? Can I use map-reduce an开发者_开发知识库d if so then how?[详细]
2023-02-25 16:56 分类:问答Aggregate functions with MongoDB/Mongoid and calculated fields
I\'m migrating an existing Rails app to use MongoDB (with Mongoid), and I\'m having some trouble figuring out how to do aggregations like you can do with MySQL.[详细]
2023-02-19 05:14 分类:问答How to Update Multiple Array Elements in mongodb
I have a Mongo document which holds an array of elements. I\'d like to reset the .handled attribute of all objects in the array where .profile = XX.[详细]
2023-02-04 08:08 分类:问答MongoDB: How to execute a query to result of another query (nested queries)?
I need to apply a set of filters (queries) to a collection. By default, the MongoDB applies AND operator to all queries submitted to find function. Instead of whole AND I need to apply each query sequ[详细]
2023-01-31 09:07 分类:问答Update MongoDB field using value of another field
In MongoDB, is it possible to update the value of a field using the value from another field?The equivalent SQL would be something like:[详细]
2023-01-21 01:42 分类:问答Return actual type of a field in MongoDB
In MongoDB, using $type, it is possible to filter a search based on if the field matches a BSON data type (see DOCS).[详细]
2023-01-06 08:03 分类:问答MongoDB Regex Search on Integer Value
I want to regex search an integer value in MongoDB. Is this possible? I\'m buil开发者_如何学编程ding a CRUD type interface that allows * for wildcards on the various fields. I\'m trying to keep the U[详细]
2023-01-01 13:35 分类:问答