Most voted "mongodb" questions
Use this tag when the question refers to a resource, information, or problem that relates exclusively to the Nosql Mongodb database. Mongodb is a scalable, open source, high-performance, schematic, and document-oriented database that supports a large number of application development languages and platforms. Mongodb is recognized as the main Nosql database.
Learn more…587 questions
Sort by count of
-
1
votes2
answers67
viewsIs there a better way to deal with relational and non-relational databases in the same project?
I am refactoring a code, where I process some data and send it to a database. I have two versions. One where I use Mongodb and the other where I use Mysql. But I’d like to put the two versions…
-
1
votes1
answer134
viewsPopulate() Ngoose only returns Objectid
I imagine it’s something very simple to solve but I’m already several hours trying to solve and I get nowhere. I’m developing a blog as a way of study but I’m having problems using the populate() of…
-
1
votes3
answers58
viewsI cannot convert mongodb files to json in python using bson in python
I am trying to work with data from an online database. I am able to do the requisitions in the right way. But when trying to convert the downloaded data using the bson package, I get a string object…
-
1
votes1
answer60
viewsENOBUFS error on Mongodb Nodejs
My database connectorMongo for nodejs, after a while running triggers the ENOBUFS error, knocking down all the tcp connections from the computer.. other apps claim tcp exhaustion.. however I could…
-
1
votes1
answer20
viewsHow to return a list of specific fields in an Aggregation in Mongodb
Hello I am creating a generic query according to the code below: // dados de exemplo em uma coleção "test" do mongodb const test = [ { "name": "foo", age: 2 }, { "name": "bar", age: 16 }, { "name":…
-
0
votes3
answers7312
viewsHow to count page views on a website
I would like to implement a page views counter on my site, present a numerical reference on the site, and use this data to perform a ranking of most accessed articles/post and automatically insert a…
-
0
votes2
answers1215
viewsIs it possible to assign Objectid() to subcollections in Mongodb?
Imagine the following Gospel: { _id:ObjectId("123456..."), user:"João", artigos:[ { id: new ObjectId(), titulo:"Lorem ispsum.", texto:"Lorem ipsum dolor sit amet..." } ] } In short: A user may have…
-
0
votes2
answers96
viewsUndefined is not a Function in Node.js using Mongoose
I know that this mistake may have several causes, but I have not been able to know mine. I have a function to save a Document in my Mongodb and I am using callback for this. The code is executed…
-
0
votes2
answers525
viewsConvert search with Pymongo: Dictionary in JSON
I’m using Pymongo to make a search: resultado = db.find_one({'nome':'xpto'}) The result of this search is a Python dictionary, but I need to convert it to a JSON. What’s the best way to do it?…
-
0
votes0
answers34
viewsRedirecting data with mongodb
I was wondering if it is possible to direct an object/result to a specific collection using the command db.collection.find(), which would equal the $out in the aggregation operation.…
-
0
votes1
answer1869
views -
0
votes1
answer598
viewsAdd json event url in fullcalendar
I’m using fullcalendar, nodejs and Mongoose. I’ve already managed to generate the json file. But when passing the path in the js of fullcalendar, I cannot recover the events. I created a json test…
-
0
votes0
answers59
viewsHelp Page Single Angular
I have an application with divided into several service blocks developed using Nodejs, Angularjs and Mongodb using Express. Each service block has its own services, controllers and their own…
-
0
votes1
answer692
viewsMongo-hacker error while installing
I am trying to install the Mongo-hacker on my pc, but getting an error that I cannot unravel. Follows what the terminal returns me: gabriel@Constantine:~$ npm install -g mongo-hacker npm ERR! Error:…
-
0
votes1
answer1375
viewsLast entry
I need to know how to get the last record stored in Mongo. I’m doing a search, comparing two IDS, need only return the last record. I have the following variables:: client.name client.cpf…
-
0
votes1
answer63
viewsSearch comparing id of two Collections
I need to load the data by joining two id On a form I fill out my client with an ID. In another form I fill out other information and upload the customer ID. That is, both forms, send the same ID to…
-
0
votes0
answers46
viewsWhat is the behavior when Mongodb reaches the defined maximum value of $inc?
What is the behavior when Mongo reaches its maximum value for findAndModify with parameters below, how can I restart to 0 when this happens? db.collection('count').findAndModify( { "_id": "xy" },…
-
0
votes1
answer1023
viewsIn Mongodb, how to search for documents by the size of an Array
I have a collection of documents that are nodes of a graph, where each node has its adjacency list: { '_id': ObjectId('547ce6f4ffaba82f360fc525'), 'adj': ['no_2'], 'nome': 'no_1' } { '_id':…
-
0
votes2
answers243
viewsHow can I create a Datagridview with Mongodb?
I want to present the BD data in a table, but so far I could only do it using a ListView. How can I do it but using one DataGridView? using System; using System.Collections.Generic; using…
-
0
votes1
answer140
viewsCircular Oriented Graphs with Mongodb
Does anyone know if it is possible to create circular oriented graphs with Mongodb or need a specific graph oriented database like neo4j. Node A (The alloy with B) Node B (B connects with C) Node C…
-
0
votes2
answers64
viewsError creating a replica set in Mongodb
I’m assembling a set of replicate mongod instances, the primary node initialized perfectly. But the other nodes that should appear as secudarians are not worldly of state. And when I check on each…
-
0
votes0
answers33
viewsMongodb db.loadServerScripts(); fatal error Missing } after Property list nofile_b:2
I’m trying to execute command db.loadServerScripts(); but is returning the following error: SyntaxError: missing } after property list nofile_b:2…
mongodbasked 8 years, 7 months ago Luciano Ferreira Filho 1 -
0
votes2
answers754
viewsChange the value of a global variable within a mongoDB function?
How can I change, for example, the Myvar value within the Collection.Insert function? Thank you! ;)…
-
0
votes1
answer165
viewsmongodb error: E QUERY Syntaxerror: Unexpected Identifier
I am trying to use mongodb for the first time and did the installation using Macports after that. In a terminal run the mongod. In another run the command Mongo. in the Mongo terminal I try to…
-
0
votes2
answers327
viewsMongodb problem in listing data with php
var mongoose = require('mongoose'); var db = mongoose.connection; // db connect db.on('error', console.error); db.once('open', function() { console.log('Conectado ao MongoDB.') });…
-
0
votes0
answers71
viewsError handling PHP session in Mongodb
I am using an Handler for php session in which you save the session data in Mongodb. However, while reloading the page at short intervals, it throws an error: "Failed to write Session data (user)"…
-
0
votes1
answer60
viewsCreating a forum, doubt between which languages to use
I am creating a discussion forum from scratch, but I already have a good part of the web skeleton like: creating a topic, responding and viewing topic. My doubt is between using php (I don’t know…
-
0
votes0
answers96
viewsSlow to load Mongo image with PHP
I am developing a system that uses Mysql as a database and Mongo BD for image storage. The problem is that the images loading is very slow. OBS: I am using Laravel 5.2. Function that loads image:…
-
0
votes0
answers422
viewsUpdating a list of documents in mongodb
I’m trying to update a list of objects similar to this: var lista = [ { _id: 57ea29361b297553c99d702f, nome: 'Meu nome', __v: 0 }, { _id: 57ea29371b297553c99d7031, nome: 'Meu outro nome', __v: 0 } ]…
-
0
votes1
answer520
viewsAngularjs, How to create Checkbox to insert array in Mongodb
I created a collection on mondoDB called Sleeves, where you have "name, author, genre and info" Gender is array. I have a form that will receive the values name, author and info, the Checkbox must…
-
0
votes1
answer180
viewsDefining a property within a Bsondocument
Salve galera! I’m working with c# Mongodb . Net Driver, and there’s something I don’t understand in the queries, follow the example: var dataBase = mongoClient.GetDatabase(dbName); var…
-
0
votes1
answer4579
viewsHow do I delete a specific document from a Collection in Mongodb?
The method remove() used this way: db.name_da_collection.remove(), remove all Documents from a Collection, as I do to remove a specific Document?
mongodbasked 8 years, 1 month ago Gustavo Mesquita 88 -
0
votes1
answer417
viewsUpdate specific element in a Mongoose array
How to update the following record: "_id": "56dd4489800f800000000000", "registro": "2014-09-07T09:06:17.214Z", "stars": 0, "observacoes": [ { "texto": "", "dataResposta": "", "idUsuario":…
-
0
votes1
answer464
viewsFind in two Customers using Aggregation
I need to perform a find on two Collections in mongodb using Aggregation and place the results in a single array. I’m trying to do it this way, but it doesn’t work. I have Visiting and Opportunities…
-
0
votes0
answers39
viewsDocument structure
Hello, I’m starting to learn Mongodb, and I have a question I haven’t found anywhere: Documents from the same collection may have different structures. Example: { "id": "1", "name": "John" }, {…
-
0
votes1
answer286
viewsHow to make a findOneAndUpdate in an array within another array with Mongoose
I am beginner in Mongoose, I would like to make an amendment (findOneAndUpdate) in the second array address in the city field, I tried everything I knew and I thank nothing to everyone who can help.…
-
0
votes1
answer29
viewsHow to update an array with Mongodb and Morphia?
I need to update a Ingredient in the ingredient list. So far I only know how to update the entire JSON. How do I update only one item of the array? { "_id" : ObjectId("573c721f75fe72149c4d9987"),…
-
0
votes2
answers61
viewsMongodb not installed
For some reason the server I work uninstalled mongodb. The database was with approximately 200GB of data. If I reinstall mongodb I run risk of losing the data? Is there any way I can dump without…
-
0
votes1
answer88
viewsMongodb integration with ASP.NET MVC 5 and Postgresql
I am building a project in ASP.NET MVC 5 with Postgresql database, in this database there is a history table that will grow in about 500,000 lines per month and we will have reports that will gather…
-
0
votes2
answers113
viewsQuerie mongodb with regex
I’m trying to find the best way to make that wish on mongodb. I have this number 42999234180 and I have a table of prefixes ranging from 3 to 7 characters, I would like when searching for 4299234180…
-
0
votes1
answer9
viewsWhen I store the ID it disappears with some numbers
I was making an app and in it I needed to store the id which is pretty great type this was my id 173782035419103232 but when arriving at the database it modifies to 173782035419103230 as I can do…
-
0
votes1
answer75
viewsSharding in Mongodb
Good afternoon, I’m thinking of implementing a cluster for sharding using Mongodb, analyzed the options for Shard key, and in my case the most recommended would be to use the policy of Zones (tags).…
-
0
votes1
answer634
views1:N and N:M Mongodb parse-server relationship
I have two questions about modeling a database 1: In 1: N, with mongodb, I must save in the child entity the ID of the parent entity object, or the parent entity save an Array with the child Ids? In…
-
0
votes1
answer103
viewsHow to add item in API
I’m doing a basic forum just for testing, I’m using the mongo and postman to add some things for testing. However, now, I want from the page, I send such data. Use of…
-
0
votes1
answer470
viewsError in Mongoose findOne
I’m getting Error: Invalid argument to findOne(): 'texto pesquisado' when executing the findOne mongoose: const User = mongoose.model('users', mySchema); const query - 'texto pesquisado';…
-
0
votes1
answer5482
viewsHow to export and import a database
I have mongodb installed on two different computers, where I am studying/developing applications. Usually at the end of the day, I send all the code to a Git server, but the database remains local.…
-
0
votes1
answer163
viewsDoubt in modeling Mongodb
From what I studied, when modeling an application using Mongodb one should always think about the application. Thinking about a system that has Promotion and Gender, where a promotion has a Gender,…
-
0
votes0
answers82
viewsDisplay items of a particular ID using angular GET
I’m making a very basic forum where the user type the title, subject and theme description, and this is sent to Mongo (I’m also using Postman), with the help of the people from here on another…
-
0
votes1
answer143
viewsDoubt about the structure of the Nodejs + Mongo app in Digital Ocean
Guys by indications I started using 1 machine at Digital Ocean in place at UOL Host. As I don’t have much experience with the server setup part, I’m in doubt and hope someone will help me: Setting:…
-
0
votes1
answer524
views