Questions tagged as 'mongodb'

1
answer

Apply filters to NoSQL query in MongoDB

I am working on a project that uses a NoSQL database and would like to know how to make a query to filter through the source field of the following data set: { "_id" : ObjectId("55f9ba45647ba23c39207e9d"), "ident" : "66198708-5c...
asked by 10.12.2015 / 21:11
1
answer

Find string in file and go back up in file to extract process name

I explain: I have a java application that dumps data of all the processes running on my pc in a text file by means of a command; this file will be generated every 5 seconds for example (thread). The generated file has about 130000 lines, so it's...
asked by 19.10.2016 / 17:20
2
answers

How to recover all the GridFs files in MongoDB?

I have saved files in Mongodb using GridFs and C # but now I need to recover ALL the files I have saved in my database and store them in a folder. I hope you can advise me a little. Thanks This is the Code as I keep my files var connectionS...
asked by 22.11.2016 / 16:25
1
answer

Difference between db.collection.ensureIndex () and db.collection.createIndex () on mongodb

Is there a difference between creating an index using the ensureIndex() command and the createIndex() of MongoDB?     
asked by 04.12.2015 / 20:31
1
answer

Auto-Reference in MongoDB

I have a collection which has a parent field that refers to documents from the same collection, now what I do is call them and find the id of the parent and create a children field where all the subdocuments go, this I do in the controlle...
asked by 21.12.2015 / 16:19
2
answers

Problem filling object with node and mongodb

I have the following function function getParadas(req,res){ var find; let paradas ={ paradasMetro:[], paradasCercanias:[], paradasBus:[] } var find1= ParadasMetro.find().sort('nombre_parada'); var find2= ParadasCercanias...
asked by 10.08.2017 / 20:44
2
answers

Using $ unwind on object properties

Is it possible to use $unwind on the properties of an object when making a query with agregation in MongoDB v3? I need to extract the controls that meet certain conditions in each object of the array of objects in each area code...
asked by 16.12.2015 / 13:14
1
answer

PHP with Mongo, questions with questions

I have a code very similar to the one in the photo, in the part that says '$gte' => 18 I just want to replace 18 with a variable that the user enters. I already have the variable and tried with '$gte' => $num but it does not...
asked by 12.07.2016 / 20:56
2
answers

automatic consultations to mongodb once a month

I have to perform an operation for each document of a collection on a specific day of the month and save the results in other documents from different collections, my question would be which is the best way to do this, it would be with a bash sc...
asked by 27.12.2016 / 17:28
2
answers

convert ListDocument to json

I have a problem I do not know how to convert the List<document> to json: public static List<Document> d() { conexion c = new conexion(); List<Document> resultados = new ArrayList<>();...
asked by 04.10.2017 / 22:20