I am using Passport.js for Express, which already holds the current user in the session variable req.user. Yet when I try to update a MongoDB database I can onl
I am using Passport.js for Express, which already holds the current user in the session variable req.user. Yet when I try to update a MongoDB database I can onl
I have some write performance struggle with MongoDB 5.0.8 in an PSA (Primary-Secondary-Arbiter) deployment when one data bearing member goes down. I am aware of
I would like to use mongoose in order to send a query to get data but it has to be case insensitive. I'm doing this: model.find({ name: /etoile/i }).sort({ po
Sometimes it's useful to allow numbers to be treated as keywords or strings when using a search index. For example, suppose I have transaction data something li
I have following documents: [ { "_id": "6245131fdbcda3639d75c951", "username": "joy", "description": "description english", "product_code_orig
I am deploying my first replica set on a Windows 10 machine with MongoDB 5.0. For the purpose of the tutorial, I want all the servers running on my machine, on
I'm trying to connect MongoDB with node.js, but the terminal is showing MongoAPIError: URI must include hostname, domain name, and tld Backend Code I have writt
I want records which if type have 0 or 2 than status should not equal to 0 and if type = 3 then ignore status. I tried this way but not working. db.activities.f
Mongo DB is called in every 1 minute to insert data. and in between this process, the Mongo DB service is auto-stopped frequently.
I am trying to run my discord bot but I get this error [12/4/2021, 2:06:02 AM] - [INFO] - [ShardManager] Started 1 shards [12/4/2021, 2:06:28 AM] - [ERROR] - co
I have tried the following steps to install and setup mongodb in my mac from here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ but I got th
Let's say 100 documents (so to say polygons) in a collection named Areas with this structure: { ...otherFields, commonName: "Butwal", area: { type: "
I am new to MongoDB and just encountered two types of connection string. mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[datab
I'm working on a pretty vanilla boilerplate blog-style application using mongoDB, express, react and node. It allows for user registration, authentication, for
I am migrating a MySQL table which has 50 million+ rows and 40 columns to a MongoDB database. This table data is shown on a html table and every column is searc
I am trying to create a new folder in the main directory Tried all kinds of examples sudo mkdir /data/db sudo mkdir -p /data/db I keep
I'm trying to update my document, if I don't pass a field it is being deleted. my document is { "_id":"27fc47a4-0730-446c-8acd-41aa6e227406", "user_id":"a
I am explaining with a simple example see my MongoDB collection looks like this: [ { pid: erwer, qty: 3, LevelDetails: {
I am running a Node.js API connecting to MongoDB Atlas with mongoose. The Node.js API runs on Google Cloud Run. I open one connection using mongoose mongoose.co