Questions tagged as 'mongodb'

0
answers

UPDATE ON MONGODB USING $ PUSH

The $ push operator in mongoDB accepts only numeric value to change when I try to do sub = 1 , for example, it does not work. In the first example I can update normally (static), in the second not. db.my_collection.updateOne({"_id":3, "p_act"...
asked by 20.02.2018 / 15:09
0
answers

Reading Java CSV file and MongoDB

I need a help! I'm new to java and need to import from a CSV file and save inside MongoDB! Importing is already being done successfully, however, I need to save the values in mongoDB in the style of an array. Example: Each I have a given Father...
asked by 18.02.2018 / 23:23
0
answers

Mongod.conf does not work

I created an instance on AWS EC2 and installed MongoDB. After that, I opened the Mongod.conf file and changed the parameter bindIpApp: true. When I type sudo mongod no console , it looks like the code does not work (I can not con...
asked by 16.02.2018 / 17:46
0
answers

Problem initializing mongodb in Windows

mongodb stopped working on my computer from time to time, when I type " mongod " in cmd the following log appears:    2018-02-14T12:23:31.189-0700 I CONTROL [initandlisten] MongoDB starting : pid=31268 port=2701...
asked by 14.02.2018 / 20:27
0
answers

Error MongoDB - geoNear "no geo indices"

To get a MongoDB database I use the following code: router.get('/multibancos', function(req, res, next){ MB.aggregate().near({ near: { type: "Point", coordinates: [parseFloat(req.query.lng) , parseFloat(req.query.lat)] },...
asked by 08.02.2018 / 23:19
0
answers

How to do a lookup of several collections MONGODB

Good I have a main collection, which has an ObjectID attribute that references one of two collections. Depending on another attribute (Boolean), I have to join with one of the collections. If I want to list all the documents in the main collecti...
asked by 04.02.2018 / 22:59
0
answers

Problems with mongoose searches

I'm having a problem to do a search on moongose, I have a function that does searches for all the ids I send but when I pass the id between "5a01e1dbaf371d00152eae89" it works very well however if I go through the function l...
asked by 29.01.2018 / 12:46
0
answers

Mongo Update is returning internal server error

router.get('/addInv', function(req, res, next){ var usrInv = req.query.invusr; EventData.update({_id:"5a6e22140c87a94340ac33ca"}, {$set: { invit: usrInv } }) }); When I try to insert the array contained within the 'usr...
asked by 28.01.2018 / 20:37
0
answers

How to create a php + mongodb container?

I would like to know how do I create a container where I can use mongodb in a php project? The way I'm doing does not work, I can not connect to the manager. docker-compose.yml version: "3.1" services: mysql: image: mysql:5.7 conta...
asked by 03.02.2018 / 22:51
3
answers

Get value from the Mongo field as Variable?

Gentlemen, I'm using this code in Meteor: var teste = Orders.findOne({name : 'Day'}).day; To get the day value in this record: {_id: "HzoGFKRmYzmH8Yx6A", name: "Day", day: "Jan 27th 18"} It gives an error, but it rescues the value I wa...
asked by 01.02.2018 / 05:51