Category "mongodb"

Not able to add more than 1 post request in the mongo db

i am using mongo db to fetch and post the data but unable to post more than 1 request here is my code ON posting the different values second time i am getting t

how can I give order wise Projection in mongodb query

I am new to monngodb, my query is below $mng = new MongoDB\Driver\Manager("mongodb://localhost:27017"); $filter = [ "archival"=>0];

How can i get specific error messages from a Mongoose Schema?

I am trying to set up user validation in Mongoose and struggling to get the specific messages to appear. Here is my model const userSchema = new Schema({ n

Get index size on each shard?

I have a compound index on a sharded cluster living on Mongo Atlas. The Atlas UI tells me the index size is 10.1GB. Similarly, MongoDB Enterprise > db.myColl

Trying to iterate over a mongodb cursor twice - failing

I am executing a query against my mongodb database... and then in two separate spots in my front end logic, I need to iterate through the results to extract / s

Mongodb: Text Indexes vs Atlas Search

These two features look pretty simmilar, but Atlas Search is fresh and maybe more powerfull. Is Atlas Search a replacement for Text Indexes in MongoDb? Will Tex

Cannot connect to MongoDB Atlas despite allowing all IP address to access

I am unable to access MongoDB database for some reason. I have run through the usual suspects such as removing <> brackets around the password and also ma

Unable to connect MongoDB server?

I have tried to connect to MongoDB server using the below-mentioned link but I am getting an error, I have entered the correct password and dbName but it couldn

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Why?

I am having a issue while saving the image file in MognoDB. It is saying the error (node:14849) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]

Using stream in mongodb is very slow

I am using the nodejs driver and the collection has ~45k documents, the query returns ~3k documents, but its almost taking 30seconds to iterate. The batch size

How to have class-transform converting properly the _id of a mongoDb class?

I've the following mongoDb class: @Schema() export class Poker { @Transform(({ value }) => value.toString()) _id: ObjectId; @Prop() title: string;

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

MongoDB: Find an object by its ID without knowing the collection

I have an mongodb databse with 100+ collections. I'm trying to find an object, with a known ObjectID, that belongs to some (unknown) collection of this database

spring mongodb: arrayFilters is absent

I need to build an update operation like this: db.collection.update({ "referencedGeneralPractitioner.id": "id1" }, { $set: { "referencedGeneralPractitio

Mongoose.js not removing object from array

I'm using Mongoose with my Discord bot and I'm making the feature where the infractions can be removed from any mentioned user(s). The infractions are saved in

Cannot create property 'ignore_whitespace' on string ' '

const Validator = require("validator"); const isEmpty = require("../validation/is-empty"); module.exports = function validateRegisterInput(data) { let errors

Mongoimport error: server returned error on SASL authentication step: BSON field 'saslContinue.mechanism' is an unknown field

I am trying to import some json files to mongodb collections using following command on a server other than mongodb server: mongoimport --host IP --port 27017 -

Merge two array objects together in Mongodb from $Lookup

I have two Mongodb 3.6 collections where one references another as an example data below where certs.$Entities.Id: entities._id: certs: { _id: ObjectId('x

Pyspark Fetching MongoDB records using MongoConnector and Where Clause

I'm trying to read MongoDB using this guide df = spark.read.format("com.mongodb.spark.sql.DefaultSource").load() df = df.select(['my_cols']) df = df.where('date