Questions tagged as 'mongodb'

1
answer

Regular expression for wildcard word collection

I'm stuck in the following situation: I have a dictionary of words in a mongodb bank, where each word is stored in a document, which has additional information about it. I need a regular expression that can find each document through the word...
asked by 13.11.2018 / 02:35
0
answers

Aggregation in MongoDB

I have two city and state Collections as follows: cities { "_id" : ObjectId("5be385fdb9ee9a25f7e418a9"), "ID" : "1", "Nome" : "Afonso Cláudio", "Estado" : "8" },{ "_id" : ObjectId("5be385fdb9ee9a25f7e418aa"), "ID...
asked by 09.11.2018 / 23:13
0
answers

Query MongoDB + Redash

I need to make a query in Redash that generates a Ranking that is usually simple I do an unwind of what I want and use a sort to leave in the descending order, however now I need to make a query that has several "matches" within the matchs check...
asked by 07.11.2018 / 15:04
0
answers

Query with last records grouped by 1 field

I'm using PHP with the MongoDb DRIVER. I can use simple query using sorts , selecting a record by id, but I want to make a query that takes the last records of the collection, grouped by idHostName . In the document I have the...
asked by 08.11.2018 / 13:52
1
answer

nodejs + mongoose how to make one query need another?

I have two tables they have a link id being table A (Initial) tableB (dependencies) but there may be dependencies dependencies. I'd like it to just return in the dependency sequence. function Deps(dt) { return new Promise((resolve,reject)...
asked by 11.11.2018 / 07:23
1
answer

Mongodb - Find sales containing two products

I am a beginner at Mongodb and would like help with the following question. I have a collection that has the following structure: {[{id_venda:1, id_produto:20}, {id_venda:1, id_produto:3332}, {id_venda:1, id_produto:9}, {id_venda:2, id_p...
asked by 27.10.2018 / 15:03
0
answers

How to make a query in different tables in the same query in MongoDB

Is it possible to query below in MongoDB? The example is in MySQL:    SELECT COUNT (*) AS QTD FROM OPERATORS OP, GROUPS AS GR, AUTHENTICATIONS AS ATH, RESTAPI AS APIs WHERE OP.NAME = 'test' AND GR.NAME = 'group' AND ATH.LOGIN_NAME = 'testa...
asked by 23.10.2018 / 22:51
0
answers

Criteria with MongoDB

I would like to pass in a certain endpoint a filter ex "MyClasseVO", in a single endpoint can do several filtering. With criteria / Jpa + relational database I can do perfectly, someone would have some tutorial or hint using MongoDB to do this k...
asked by 12.10.2018 / 20:22
0
answers

Check on mongodb if there was addition in the last 12 hours

First let's explain what I'm trying to do. In this system people earn between 1 and 5000 thanks coins if they order. The data is saved in MongoDB: IP, Date, Address of the Portfolio, Quantity shipped! I can not check if in the last 12 hours t...
asked by 15.10.2018 / 18:48
0
answers

Problems connecting Node and MongoDb

Some days ago I'm having a problem with a code that I can not resolve. What I am trying to do at the moment is to register the users in mongodb through the node. I am using the view mechanism ejs, but until then I have checked everything and it...
asked by 23.09.2018 / 03:15