Questions tagged as 'mongodb'

1
answer

Cycle an arrangement of a MongoDB object in Python with Django

I'm trying to cycle an array that comes from a node in mongoDB, this is Mongo's object: { "nombre": "Sebastián Yatra", "paises":["México","Argentina","Perú"] } The view controller is this from django.shortcuts import render from pymon...
asked by 03.08.2018 / 22:02
1
answer

Delete documents in MongoDB

I have a mongo database with a collection that has about 6,000,000 documents. I would like to know how to delete all the documents without deleting the database or the collection. I saw that with remove it can be done, but I doubt i...
asked by 13.08.2018 / 11:47
1
answer

Consult MongoDB from Python

I'm trying to make a query to MongoDB from Python, I'm just getting into these technologies. I have this code import pymongo from pymongo import MongoClient client = MongoClient() db = client.crawler.users res = db.find() print( res )...
asked by 07.07.2018 / 00:17
1
answer

The best way to consult a large amount of data with MongoDB

I have a 1.6GB collection that basically have 2 data: nombre and documento . The document has this structure: { "_id": ObjectId("5a6ba42850c4631898754a06"), "nombre": "Jorge", "documento": "4918273627" } I look for th...
asked by 07.02.2018 / 23:58
1
answer

MongoDB on the native driver port

   You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number This is the message I get when I try to access link after having mongo running. What do you mean by the follow...
asked by 26.06.2017 / 20:42
1
answer

How to save an image of any format in Python?

I have been investigating the way to save an image in python but so far I have not found anything that can be useful, what I need is to know that import have and how to save the image in python, this image will keep it in a database in mo...
asked by 07.08.2017 / 19:17
1
answer

Display an arrangement of a mongodb document in html / jade

Greetings, I have a problem and I do not know how to consult the elements of a document that has an arrangement and show them in Jade. Recibo.aggregate( {"$match":{"nombre":{"$in":req.body.listNombrePTC},"fecha":{"$gte": lastWeekDay, "$lte": t...
asked by 09.02.2017 / 22:11
2
answers

Problems creating or updating records from array

I need help. I am setting up a system for loading notes per subject per student. I put together a spreadsheet to load these notes (angular) and once they finished loading, I sent all that object to be processed, but when I try to save those n...
asked by 01.03.2017 / 16:36
2
answers

Check for repeated tweets in MongoDB

I have a method that, thanks to Twython, saves the tweets in MongoDB as it is in my question Maintaining a mongodb with tweets that match a given tag def getSearchTagTwitter(hashtag): db = connexMongoDB() t = loginTwython() searc...
asked by 17.02.2016 / 18:09
1
answer

Map from Java to Mongo an object with custom structure

I'm using a Mongo database and the backend with Java Spring. Originally it had this structure: "defaultActivation":{ "accounts": ["500026", "500027"] } And I mapped it with the following structure in Java: private Map<String, Set...
asked by 30.06.2016 / 22:24