Questions tagged as 'mongodb'

1
answer

In mongodb what is the difference between the error code 11000 and the error code 11001?

I hardly understand that error 11000 is about conflict that exists. Error 11001 I can not figure out I have this code if(error.code === 11000 || error.code === 11001){ var apiError = new ApiErrors.ValidationError(error.errmsg || 'Ther...
asked by 07.07.2017 / 18:51
1
answer

How to modify the value of an element of an array in mongodb?

The fact is that I have the following document and I want to modify the duration of the song Sleepwalker, but before reaching it there is an array. I have tried to modify fields that although they are nested they do not contain arrays and it has...
asked by 17.06.2017 / 18:53
1
answer

anonymous class implements interface; can not have arguments

I'm trying spark on maven but I get this problem I want to show me the port but the runable shows me this error    "anonymous class implements interface; can not have arguments" Code public class HelloWorldSparkStyle { publ...
asked by 04.06.2017 / 17:05
0
answers

How to make a query with several pipes with python on a MongoDB database [Errno 111]?

I want to make a query about a mongoDB database with a python script that will allow me to modify the query about the schedule. However I am not able to visualize the result: #!/usr/bin/python import pymongo import datetime import pprint fro...
asked by 23.05.2017 / 11:23
0
answers

SQL CONNECT ERROR: Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root' @ 'localhost'

Good morning I have a problem with the mysql connector, the problem is the following download a library in git here when placing the command node app.js import I get the following error λ node app.js import Failed to load c++ bson...
asked by 01.06.2017 / 15:21
0
answers

Massive insertions in MongoDB with Python

I'm using python + MongoDB with pymongo So far everything is fine but now I would like to optimize the insert, what I do is read a csv with 50000 rows and create a loop to read row by row, going to json and insert (insert), it takes a long ti...
asked by 16.04.2017 / 23:24
1
answer

Index correctly to optimize a query

I have a problem with a query type for MongoDB. In a data collection I have indexed almost all fields with {a: 1}, {b: 1} ... and queries like the following have a very good performance: db.installations.find({deviceToken:"mydevicetoken"})...
asked by 04.04.2017 / 13:59
2
answers

Search for text with mongo in several reference collectionsj

As mongodb does not support join and I have the need to search several collections of businesses, services, and users, I have arrived at a solution but I need to be validated and / or improved. The flow of the scheme would look like this: B...
asked by 11.02.2017 / 05:46
1
answer

MongoDB extract information and create object

public void BuscarPorfecha(String fecha) { BOE boe = new BOE(); List<BOE> lista = new ArrayList<BOE>(); int i = 0; MongoCursor<Document> cursor = collection.find(eq("fecha", fecha)).iterator(); while (cur...
asked by 03.02.2017 / 18:25
1
answer

Fill dataset with MongoDB and c #

How can I migrate this Oracle code to MongoDB? I'm using C # and the idea is to fill the Dataset with Mongo data.    Original Code private DataSet datos() { DataSet dataSet; OracleCommand oracleCommand = conn.Create...
asked by 24.01.2017 / 01:07