Top "Mongodb-query" questions

This tag is for questions related to querying and updating MongoDB collections, either through the mongo shell or using a programming language driver.

Mongodb aggregate (count) on multiple fields simultaneously

I've got documents that look like this: { "_id" : "someuniqueeventid", "event" : "event_type_1", "date" : ISODate("2014-01-14T00:00:00Z"), } I want …

mongodb mongodb-query aggregation-framework
Query with filter builder on nested array using MongoDB C# driver

Consider the following object structure stored as documents: public class Foo { public string Id { get; set; } public ICollection<FooBar&…

c# mongodb mongodb-query mongodb-.net-driver mongodb-csharp-2.0
how to insert blob data in mongodb,is there any additaional software required

I have just installed mongodb on my system, I wanted to know if it was possible to insert blob data …

mongodb mongodb-query mongodb-java spring-data-mongodb
Mongo db using result of query in another query using $in

I have the following model in mongo db: User collection { _id:12345, name:"Joe", age:15, } Addresses collection { _id:7663, userId:12345, Street:"xyz", …

mongodb mongodb-query aggregation-framework non-relational-database document-based-database
MongoDB Duplicate Documents even after adding unique key

I have created a collection and added a unique key like this db.user_services.createIndex({"uid":1 , "sid": 1},{unique:true,…

php mongodb mongodb-query aggregation-framework
Create & Find GeoLocation in mongoose

I'm trying to save the longitude/latitude of a location in my user Model and query it with $geoNear. I've …

node.js mongodb mongoose mongodb-query geospatial
Create a conditional TTL in mongo

There is a particular task I want to accomplish, but I am not finding any particular way to do that. …

mongodb mongodb-query mongodb-indexes
MongoDB sort documents by array elements

I have document structure like : { map: 'A', points: [ { type: 'type1', distanceToSpawn: 110 }, { type: 'type4', distanceToSpawn: 40 }, { type: 'type6', distanceToSpawn: 30 } ] }, { …

mongodb sorting mongodb-query aggregation-framework
How to use mongodb skip() and limit() in meteor?

How to use skip() and limit() in meteor? Post.find({"user_id":user_id}).skip(0).limit(5); when I execute above …

mongodb meteor mongodb-query
MongoDB print distance between two points

When I am firing this query on MongoDB, I am getting all the places in the proximity of 500 miles to …

mongodb mongodb-query geospatial