Questions tagged as 'mongodb'

2
answers

DB Dynamic MongoDB

I'm starting a web project and I'm thinking of using java with mongoDB and Spring data. In this web project, each user would have their own bank. That is, when the user logs in (this would be a shared bank, where it would contain only the login...
asked by 19.06.2014 / 14:49
2
answers

Is there any way to search (FULLTEXT) in a specific field in MongoDB?

I have a full-text index in MongoDB and need to search only on top of a field, rather than all. Anyone know if this is possible?     
asked by 18.04.2014 / 03:53
0
answers

What are the best practices for putting mongoDB into production?

I'm studying node.js, and in most courses the staff uses mongoDB, I really enjoyed working with it, very simple and practical, but I have some doubts: Nowadays, do most of the hosting already support MongoDB? How to tell if the project is...
asked by 09.05.2018 / 03:19
0
answers

MongoDB - How to insert an ObjectID via variable?

I'm learning MongoDB and I had a problem, I'm trying to insert an ObjectID into an array via variable, but I'm not getting it. I'm doing the following: > var aluno = db.alunos.find({"nome" : "leandro"}); > aluno; { "_id" : ObjectI...
asked by 20.04.2018 / 17:36
0
answers

Cosmos Error DB: Request rate is large

I am making a filter to get the last record sent to a collection by a device and the query is very simple: db.getCollection('Device').find({'ID':'1234'}).sort({DateTime: -1}).limit(1) However, if I do with limit(1) it gives er...
asked by 09.01.2018 / 13:27
1
answer

Mongodb seeks to return internal arrays

Example structure: { "_id" : ObjectId("598d4eb912f28534d80a5820"), "nome" : "Emilio", "produtos" : [ { "_id" : ObjectId("598d4fb912f28534d80a5821"), "nome" : "produto1" }, { "_id" : ObjectId("598d4fb912f28534d80a5...
asked by 11.08.2017 / 09:25
0
answers

I wanted to do a query that would return the following data in mongodb

COLECTION GAMES { id : 10, casa : "Sport", visitante : "Chapecoense", horario : "2017-07-20 11:00:00" } COLLECTION BETTER { nome : "wedson", apostas : [ { idjogo : 10, opcao : 1, valores : 1 } ] } I w...
asked by 16.07.2017 / 11:26
0
answers

installation problems MongoDb

People, for the love of DEus, I've done everything in the world and I can not install mongodb on my machine, it's 32 bits, always the problem of incompatibility ... please someone can help me .... I've downloaded several packages there, but n...
asked by 12.07.2017 / 16:41
0
answers

How to optimally handle errors in Mongoose

I'm starting to work with MongoDB + Mongoose and I'm having trouble dealing with the errors that mongoose generates. One of the same is when there is a duplicate key for a parameter that should be unique. Ex: Model (UserModel) const mongo...
asked by 03.04.2017 / 06:05
1
answer

I am not able to load only one element of an array at a lower level in mongodb

Person I'm trying to pull just a helper, I'm doing the following, db.colecao.find (     {official.name: John}     {'official.helper. $': 1} ); But everyone always comes, I've tried in many ways, obs in helper could be much more dynamic {...
asked by 07.08.2017 / 22:21