Category "mongodb"

What are error 2503 and error 2502 in mongo db?

I'm trying to install mongo db, but when installing compass it's not working properly. I tried to uninstall and reinstall, but when uninstalling it give two err

How do I update a MongoDB collection with values from another collection?

I have a MongoDB collection called properties and another collection of new data in a collection called newProperties. I want to update a single field (amoun

How to efficiently read data from mongodb and convert it into spark's dataframe?

I have already researched a lot but could not find a solution. Closest question I could find here is Why my SPARK works very slowly with mongoDB. I am trying t

Property Type Does Not Exist - MongoDB WithId<Document>

Using: ts-node: 10.7.0 MongoDB: 4.4.1 GraphQL: 16.3 I am trying to get a response back from a mongo db request. The request is successfully coming back, but typ

Insert json file into mongodb

I am new to MongoDB. After installing MongoDB in Windows I am trying to insert a simple json file using the following command: C:\>mongodb\bin\mongoimport -

Nodejs Mongoose Error: getaddrinfo ENOTFOUND undefined undefined:27017

I'm trying to switch to mongoose from using just the native mongodb and having some trouble. Connecting to the db as I did previously works fine: var db; var

MongoDB query optimizer keeps choosing the least efficient index for the query

I have a large collection (~20M records) with some moderate documents with ~20 indexed fields. All of those indexes are single field. This collection also has q

How to make $filter operator inside a projection of an aggregation using the MongoDB Scala Driver

I need to filter array of embedded documents inside a projection of an aggregation operation. I know there is this new $filter operator, but I do not know how t

Multiple schema references in single schema array - mongoose

Can you populate an array in a mongoose schema with references to a few different schema options? To clarify the question a bit, say I have the following schem

Getting error "Converting circular structure to JSON" while working with express,mongodb

I'm trying to find tours within a specific distance.here is my code exports.getTourWithin = catchAsync(async (req, res, next) => { const { distance, latlng

Get data between two dates mongo

I need to query the data between two dates. I was pushing data into mongo where dates are in the format : 13-10-2015 15:08:22 Is there a way to do it? Can't i

How do I loop through the search results and based on which ids match return true to display different info for it?

so I am trying to search through the search results and see who already exists in the friendRequest array of the user searching. If they exist then I want to ch

behaviour of balancer in mongodb sharding

I was experimenting with mongo sharding. The collection has shard key as {policyId,startTime}. policyId - java UUID (limited values,lets say 50) startTime

Failed: can't create session: no servers available: server selection failed: context deadline exceeded

I'm getting an error while trying to use the mongodb for bi connector. I am in the generation stage of the schema of difinição of the file utlizna

Mongo connection failing from Mongoose but works from shell

I am trying to connect to a Mongo app from my Node application using Mongoose. I have done this before on the same machine, but this time I am having a connecti

Heroku and MongoDB Atlas - 5000ms Response time??? (MERN stack)

Have recently built a MERN stack application. For whatever reason I can't figure out, I'm getting a 5000ms response time and can't for the life of me figure out

group in mongo excluding null values

I have mongo query which does the group operation on the documents. I have almost got the expected results except that I want to refine the results without emp

Check whether the document exists using Mongodb and Java?

I have created a simple java application as my college mini project in which one of the module I'm allowing users to perform operations like insert, delete, upd

MongoDB "Writing to log file failed, aborting application"

After save about 80G data, mongodb just crash. journalctl -u mongod shows the error message below mongod[4948]: {"t":{"$date":"2022-03-31T10:38:44.089+00:00"},"

Add key value pair data

I have a schema in Mongoose that looks like this: const SocketDetailsUserSchema = new mongoose.Schema({ userId: String, socketValue: [{ id: St