Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-2 votes
0 answers
17 views

MongoDB inserts super slow after indexing [closed]

I have a MongoDB collection that is almost 1 TB in size. The collection already has indexes in place for faster querying. However, when I try to add new data, the insertion process becomes extremely ...
Alhasan Mohammed's user avatar
-2 votes
0 answers
27 views

Designing a MongoDB Schema for Efficiently Managing and Querying Ordered Sequential Values [closed]

I have a mongoDB collection findings which contains the following documents { name: "finding1", group: "group1" }, { name: "finding2", group: "group1" },...
BigL's user avatar
  • 161
0 votes
1 answer
35 views

Setting primary key in Realm MongoDB

I am trying to make a collection of cocktail recipes. In this case, every recipeName field in Realm object is unique. Then can I set recipeName to be the primary key so that I can call useObject() ...
seans's user avatar
  • 9
0 votes
1 answer
53 views

Data Not Updating on Dashboard in Production Environment

I have a web application with payment system integration, and I am facing an issue where the payment data is not updating in the dashboard in the production environment, although it works fine in ...
khabzox's user avatar
0 votes
0 answers
45 views

Database integrity in mongo DB with hooks

I am trying to use mongo DB for my MERN app. So far I have used SQL databases where database integrity has never been an issue. But mongo being No-SQL does not support foreign key relation which is ...
avinash bharti's user avatar
0 votes
0 answers
25 views

How do I continuously fetch the last N documents from mongodb? [duplicate]

I can fetch the last 10 documents like this: collection.find({}).sort({_id:1}).limit(10).toArray(); I am building an express api to continuously fetch the next N. For example, Get request with arg=1 ...
JobHunter69's user avatar
  • 2,085
0 votes
0 answers
22 views

next_connect__WEBPACK_IMPORTED_MODULE_3__.default) is not a function

import dbConnect from '../../lib/mongodb'; import Job from '../../models/Job'; import multer from 'multer'; import nextConnect from 'next-connect'; import fs from 'fs'; import path from 'path'; const ...
Aryan Khera's user avatar
1 vote
2 answers
29 views

updating related relations in database

i have created groups , which has members , each member has a group array displaying which they are part of . if i delete a group i want that user's group array also updates. i am using express and ...
Pakshal Shah's user avatar
0 votes
0 answers
46 views

Tyring to connect my backend with mongoDB

I'm trying to connect backend with mongo_db , but i got this error again and again "Error connecting to MongoDB MongoServerError: bad auth : authentication failed" I've tried following ...
Sheraz Karim's user avatar
0 votes
1 answer
22 views

MongoDB Atlas CMD_NOT_ALLOWED: grantRolesToUser and dropDatabase Permissions Issue

I am encountering issues with MongoDB Atlas permissions while trying to manage user roles and perform administrative actions. Specifically, I am facing the following errors: MongoServerError[...
Shamanth's user avatar
0 votes
1 answer
87 views

Node.js Express application not logging MongoDB connection status

I'm developing a Node.js Express application that connects to a MongoDB database. Despite implementing logging in my code, the application does not log anything related to the MongoDB database ...
prajitha k's user avatar
0 votes
0 answers
23 views

How to use a list as a projection in MongoDB

So I am managing a database where we store information of test results for ASICs we are developing. I have one query which will return the numbers of ASICs that did not pass all tests: list(self.db['...
SC990987's user avatar
-1 votes
0 answers
19 views

I'm trying to create a validation rule for an existing collection but I'm getting an error

I had the below error JSON field 'collMod.validator' is the wrong type 'string', expected type 'object' This is my code db.runCommand({ collMod: "SignUp", validator: { $jsonSchema: ...
Richelle Asmah's user avatar
1 vote
0 answers
27 views

Is `{ field: { $in: [null, 'something-1', 'someting-2', []] } }` performance wise okay to use than separate query?

Query 1 : { field: { $in: [null, 'something-1', 'someting-2', []] } } Query 2 : { $or: [ { field: { exists: false } }, { field: { $in: ['something-1', 'something-2'] } }, { ...
Yash Patel's user avatar
1 vote
1 answer
28 views

MongoDB new Replica Set member's syncSourceHost

When i try to add new replicaSet member to my rs, their syncSourceHost's are always different and certainly not PRIMARY node. They all secondaries. Why is that happening? Is there a default setting or ...
antisuri's user avatar

15 30 50 per page
1
2 3 4 5
395