This tag is for questions related to querying and updating MongoDB collections, either through the mongo shell or using a programming language driver.
I'm just trying to get a simple near query working. Here's a sample of my document. {"point": {"type": "Point", "coordinates": [30.443902444762696, …
mongodb geospatial mongodb-queryI know MongoDB is able to handle a lot of requests/sec, but let's say I have to query a …
mongodb mongodb-queryI have a document structured like this: { _id:"43434", heroes : [ { nickname : "test", items : ["", "", ""] }, { nickname : "test2", items : ["", "", ""] }, ] } Can I $set the second …
mongodb mongodb-query nosqlI know that MongoDB supports the syntax find{array.0.field:"value"}, but I specifically want to do this for the …
arrays mongodb mongoose mongodb-query spring-data-mongodbI am defining a mongoose schema and definition is as follows: inventoryDetails: { type: Object, required: true }, isActive:{ type:Boolean, default:…
mongodb mongoose mongodb-queryI have next mongo code: db.users.aggregate([ { $match: { $and: [ { UserName: { $eq: 'administrator' } }, { 'Company.CompanyName': { $eq: 'test' } } ] } }, { $lookup: { from: "companies", …
mongodb mongodb-query aggregation-frameworkHow would I get an array containing all values of a certain field for all of my documents in a …
mongodb mongodb-query databaseSo I need a custom field calculated in MongoDB as follows if( field1 =="A") ->customfield=10 else if(field1 =="…
mongodb mongodb-query aggregation-frameworkAs part of my document in MongoDB I'm storing an array of objects. How can I query it for only …
mongodb mongodb-query aggregation-frameworkMy collection in mongodb is similar to the following table in SQL: Sentiments(Company,Sentiment) Now, I need to execute …
mongodb mongodb-query aggregation-framework