Category "mongodb"

Mongodb not working on Ubuntu -> mongod.service: Failed with result 'exit-code'

I installed mongodb following this tutorial here, no errors during the installation but when I try to start the mongod server using this command sudo systemctl

MongoDB ReplicaSet issues

We are running MongoDB ReplicaSet on Kubernetes. One of MongoDB pods in CrashLoop and it shows OOMKilled as true. And the pod has crashed 234 times since then.

Update multiple elements with different value in Mongoose

I have document containing lists. Lets say they are: [ { _id: 52b37432b2395e1807000008, name: ListA, order: 1, desc: 'More about List A' }, { _id:

ECONNREFUSED error when connecting to mongodb from node.js

I know I'm doing some very stupid and noobish, but I'm hoping someone can help me set up a basic database connection to mongodb from node.js on a mac. I've ins

Calculate the median in MongoDB aggregation framework

Is there a way to calculate the median using the MongoDB aggregation framework?

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