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 BasicDBObject vs Document in java

I am using MongoDB v3.2.0 with Mongo Java Driver 3.0.4 version. I am using the BasicDBObject (deprecated) instead of using the …

mongodb mongodb-query mongo-java-driver
Calculate the average of fields in embedded documents/array

I want to calculate the rating_average field of this object with the rating fields inside the array ratings. Can …

mongodb mongodb-query average aggregation-framework
Use mongoexport with a --query for ISODate

I have this query but i´m getting a syntax error: unexpected identifier mongoexport --db ium --collection events \ --query 'db.…

mongodb mongodb-query mongoexport
Mongodb execute multiple queries in one round trip

Is there anything like elasticsearch Multi Search API ? the link is : https://www.elastic.co/guide/en/elasticsearch/reference/current/…

mongodb mongodb-query bulk
Get value from Embedded Document Mongo Java

I have the following document in mongo: > { "_id": ObjectId("569afce4b932c542500143ec"), > "date": "2016-1-17T2:31:0Z", &…

mongodb mongodb-query mongo-java mongo-java-driver
mongodb query on DBRef type

How do I turn this query in a valid mongodb Query in mongodb shell. { 'cars.owner.$ref' : 'users' } cars.owner …

mongodb mongodb-query mongo-shell dbref
Group by in node.js-mongodb

I want to use group by in my server.js, but i get this error: TypeError:Object #(Collection) has no …

node.js mongodb mongodb-query aggregation-framework monk
Golang mgo returning value with aggregate $group

How do I get an aggregate query to return field values used in the $group statement. The code: type TheGroup …

mongodb go mongodb-query aggregation-framework mgo
Implementing Mongodb query using $elemMatch in Java

I am using Mongo java driver to retrieve data from mongo collections. I have the following query which I am …

java mongodb mongodb-query mongo-java-driver
How to Model a "likes" voting system with MongoDB

Currently I am working on a mobile app. Basically people can post their photos and the followers can like the …

mongodb mongodb-query data-modeling