Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 10 14:36

    nbbeeken on npm_and_yarn

    (compare)

  • May 10 14:36

    nbbeeken on npm_and_yarn

    (compare)

  • May 10 14:36
    nbbeeken closed #144
  • May 10 14:36
    nbbeeken closed #144
  • May 10 14:36

    nbbeeken on 2.0

    chore(deps): bump minimist from… (compare)

  • May 10 14:36

    nbbeeken on 2.0

    chore(deps): bump minimist from… (compare)

  • May 10 14:35

    nbbeeken on npm_and_yarn

    (compare)

  • May 10 14:35

    nbbeeken on npm_and_yarn

    (compare)

  • May 10 14:35

    nbbeeken on 2.0

    chore(deps): bump trim-off-newl… (compare)

  • May 10 14:35

    nbbeeken on 2.0

    chore(deps): bump trim-off-newl… (compare)

  • May 10 14:35
    nbbeeken closed #143
  • May 10 14:35
    nbbeeken closed #143
  • Apr 19 14:48
    nbbeeken commented #144
  • Apr 19 14:48
    nbbeeken commented #144
  • Apr 19 14:48
    nbbeeken review_requested #144
  • Apr 19 14:48
    nbbeeken review_requested #144
  • Apr 19 14:48
    nbbeeken review_requested #144
  • Apr 19 14:48
    nbbeeken review_requested #144
  • Apr 09 19:18
    dependabot[bot] labeled #144
  • Apr 09 19:18
    dependabot[bot] labeled #144
Neil Duffy
@skiv71
:thumbsup:
Furry
@Furry
Hiya! I'm starting a project that is very latency sensitive. The DB for this project won't be large, probably only around 100-150mb, does the NodeJS MongoDB driver allow me to keep this database mostly in memory, only writing to the cloud on occasion?
I don't want it spending time getting data from the cloud with every action..
I'm unsure if the driver does this by default
JeffWiebe
@JeffWiebe
Can anyone point me to more complete information on unified topology besides what is found in the MongoDB docs here: https://mongodb.github.io/node-mongodb-native/3.3/reference/unified-topology ?
Jay Patel
@jay0512
node package -> mongodb V 3.5.7
When I am trying to use aggregate lookup pipeline, I am getting the error 'MongoError: let not supported'
Can anyone elaborate why it is happening?
Kamil
@Chester97
Hi, I have simple question - how to make an aggregation on specific document?
Stas
@stasvo
Hello, is it ok to use unique string as _id instead of ObjectID, or I will have some problems if will use just unique string?
dpsh cudi
@dpz3579
Can someone help me with auto-encryption gist.
dpsh cudi
@dpz3579
is someone facing this warning
Warning: the options [credentials] is not supported
Trinh Dinh Bien
@bienkma
Hi guys,
Can we add/remove sharded to sharded cluster and no locking during processing? I need add/remove some sharded to currently sharded cluster. (mongodb 4.4.2 sharded cluster)
Trinh Dinh Bien
@bienkma

is someone facing this warning

Warning: the options [credentials] is not supported

change crypto authenticate method or client don't have essential crypto lib.

Divyansh Chaurasia
@Asdivyansh

Hello Everyone, 👋

I am hosting a workshop about- Building your first video conferencing app! :bulb:
Join us this Friday, as we will be building a video conferencing app from scratch in the workshop using JS. 🛠

:calendar: - July 9th, 2021
:alarm_clock: - 12.00 PM EST | 9.30 PM IST
Know more-
https://community.100ms.live/build-video-conferencing-app

P.S- We are also doing a surprise giveaway, sign up to know more!

Trinh Dinh Bien
@bienkma

Hi guys,
Can we add/remove sharded to sharded cluster and no locking during processing? I need add/remove some sharded to currently sharded cluster. (mongodb 4.4.2 sharded cluster)

I solved the problem. Basically, I used the method remove/add node to sharded cluster.

choudharyratnesh
@choudharyratnesh

Hi Guys, @tzhuan
I am facing a problem in running mogodb aggregate lookup function on object id of document
i have two document from different tables
Department Table document
{
"_id" : ObjectId("60b5d01d3cad3268ec30a4db"),
"designationId" : [
ObjectId("60b5d6483cad3268ec30a513")
],
"creationTime" : 1622525747967.0,
"isActive" : true,
"name" : "CT Dept One",
"organizationId" : ObjectId("60b5cf7d3cad3268ec30a4c7"),
"brandUserId" : ObjectId("60ae11608646230e9cea8ee9"),
"createdby" : ObjectId("60ae11608646230e9cea8ee9"),
"createdAt" : ISODate("2021-06-01T06:13:49.639Z"),
"updatedAt" : ISODate("2021-06-01T06:40:08.453Z"),
"v" : 1
}
Organization Table
{
"_id" : ObjectId("60b5cf7d3cad3268ec30a4c7"),
"creationTime" : 1622525747965.0,
"isActive" : true,
"name" : "CT PVT LTD",
"brandUserId" : ObjectId("60ae11608646230e9cea8ee9"),
"createdby" : ObjectId("60ae11608646230e9cea8ee9"),
"createdAt" : ISODate("2021-06-01T06:11:09.783Z"),
"updatedAt" : ISODate("2021-06-01T06:11:09.783Z"),
"
v" : 0
}

I have tried every solution return mention here
https://stackoverflow.com/questions/41093647/mongodb-join-on-id-field-from-string-to-objectid
to get data from Organization table in to department table.
please help me to solve this problem.

@bienkma please help me in this problem
Daniel Muriithi
@Dany20
Hello friends, I have a question on mongodb compass. I've created databases in my own computer and I would like another user to have access to these databases on his own computer. How do I go about it?
Create MERN App
@mernjs

Hello Everyone, MERN Stack Boilerplate provides starter kits for building web, desktop and mobile apps in pure JavaScript.

https://www.npmjs.com/package/create-mernjs-app

If you have any query or suggestions. Please let me know.

Kasir Barati
@kasir-barati

I am working with node-mongodb-drive and i can not use $merge stage in the aggregate. mongodb throw this error: MongoError: Unrecognized pipeline stage name: '$merge'.

what can i do?

  • the same aggregate works in the mongo-compass.
tsavercool
@tsavercool

Hello All, looking for some query assistance. I have an aggregation that I need to project a child property off the first element of an array created by a $lookup. I have not found a way to do this yet.

  1. Is their a way to do a $lookup and only return the first element as an object, not an array?
  2. Is their a way to get a property from a specific element without doing 2 $project actions?

I assume I could solve this by doing
$project { someObj: { 'arrayElemAt': ['$myArray': 0] } }
and then doing
$project: { myProperty: '$someObj.myProperty' }
but this seams ugly and dirty. There has to be a better way ... ?

Kasir Barati
@kasir-barati

I am working with node-mongodb-drive and i can not use $merge stage in the aggregate. mongodb throw this error: MongoError: Unrecognized pipeline stage name: '$merge'.

what can i do?

  • the same aggregate works in the mongo-compass.

resolved. my mongodb-server version were 3.6

Nigam
@nigam00
Hi guys, I am new to Mongo, i have been trying to setup Compass with kerberos authentication but it fails to take in proper userName and Password any help or links to understand better? thanks for your help :)
Roman Schader
@romanskie
Hello Everyone, at the moment my team and I try to implement a case insensitive search via MongoDB. The current approach via Regex is way to slow and we run into performance issues. Has anyone here has any experience with this issue or any ideas how this can be achieved without using case-insensitive indices (https://docs.mongodb.com/manual/core/index-case-insensitive/)? Thank you so much in advance :)
Dzevad Alibegovic
@cuteghost
hi guys I have a question. Is there any query that requires an object, something like $elemMatch
and it would be helpful that it allows $where in that object
Mahdi Raddadi
@mahdiraddadi
Hello, I am using mongo db in a dedicated server, which is installed and configured manually, I have a query that takes only 700ms, but when I moved to Mongo Atlas, this query takes 7.60 seconds to respond
Dan Beaulieu
@dbeaulieu

hello. i think there is an issue with the docs. https://mongodb.github.io/node-mongodb-native/3.6/reference/faq/

socketTimeoutMS default says, 360000 but in reality i believe it is infinite.
https://jira.mongodb.org/browse/NODE-2835

Dan Beaulieu
@dbeaulieu
the latest docs are up to date, but i'm seeing infinite socket timeout on 3.6.10
Kasir Barati
@kasir-barati
Is it possible in MongoDB cluster to modify the same document in different nodes at the same time?
Kasir Barati
@kasir-barati
is it costly to use $in operators in a embedded document in MongoDB?
Create MERN App
@mernjs

Hello Everyone,

MERN Micro Framework provides starter kits for building web, desktop and mobile apps in pure JavaScript.

https://www.npmjs.com/package/create-mernjs-app

If you have any query or suggestions. Please let me know.

GauravPandey-NECI
@Gauravp-NEC

Hi, I am trying to upgrade Mongodb dependency in STH-Comet by changing its version from v2.2.35 to v3.6.8 in package.json. Ref: https://github.com/telefonicaid/fiware-sth-comet/blob/master/package.json#L74

After executing the command "npm install" to start the STH component as a Node application (Ref: https://github.com/telefonicaid/fiware-sth-comet/blob/master/doc/manuals/installation.md#cloning-the-github-repository) following error occurred at debug console: MongoParseError: No username provided in authority section

Here is the connectionURL to MongoDB from STH (Ref:https://github.com/telefonicaid/fiware-sth-comet/blob/master/lib/database/sthDatabase.js#L90-L96):

connectionURL =

'mongodb://' + params.authentication + '@' + params.dbURI + '/' + params.database +
    (params.replicaSet ? '?replicaSet=' + params.replicaSet : '') +
    (params.authSource ? (params.replicaSet ? '&authSource=' +
        params.authSource : '?authSource=' + params.authSource) : '');                                          

How I can solve the MongoParseError: No username provided in authority section error?

Log.JPG
tigreCoder
@tigreCoder

Hi, can someone help with this ? https://mongoplayground.net/p/VQPKluquh1A

Expected result:
{ "_id": { "campaign": 955, "date": ISODate("2022-01-16T00:00:00Z") }, "creative": [ 1343: {clicks: xxx, views:xxx} 1346: {clicks: xxx, views:xxx}, 1342: {clicks: xxx, views:xxx}, 1344: {clicks: xxx, views:xxx}, 1345: {clicks: xxx, views:xxx} ] },
...

Kasir Barati
@kasir-barati

Hello
How can I tell mongodb to ignore the E11000 duplicate key error while I am querying an aggregate and just return their _id?

More info:

  • I am using $merge operator.
  • I am using MongoDB v5.x
  • I am mocing data from collection-a to a new collection (let's name it collection-b)
  • There are 100,000 documents in collection-a and I need to break it into 3 different new collection.
Navid
@navid.ta:matrix.org
[m]
hello everyone,
is there someone can help me know how I should I use $subtract in mongodb? this is my document but I got null after subtract, what should I do?
{
"_id" : ObjectId("62187c1b27159eef85f6a919"),
"log" : [
{
"state" : {
"limitsize" : 209715200,
"uploadsize" : 8347545,
"remain" : null
}
}
]
}
db.traffics.aggregate([{$match:{username:"example@gmail.com","log.0.client":"forea"}},{$project:{"log.state.limitsize":1,"log.state.uploadsize":1,"log.state.remain":1,"log.state.remain":{$subtract:['$limitsize','$uploadsize']}}}]).pretty()
{ "_id" : ObjectId("62187c1b27159eef85f6a919"), "primeid" : "0c634181-1594-4e14-b723-9e0217525806", "uid" : "62187c1b27159eef85f6a915", "username" : "example@gmail.com", "log" : [ { "client" : "forea", "state" : { "limitsize" : 209715200, "uploadsize" : 8347545, "downloadsize" : 0, "remain" : 209715200, "request" : 0 }, "_id" : ObjectId("62187c1b27159eef85f6a91a") } ], "__v" : 0, "lastModified" : ISODate("2022-02-25T07:30:17.545Z"), "uploadsize" : 1670003158, "state" : { "uploadsize" : 0 } }
Navid
@navid.ta:matrix.org
[m]
:point_up: Edit: hello everyone,
is there someone can help me know how I should use $subtract in mongodb? this is my document but I got null after subtract, what should I do?
GauravPandey-NECI
@Gauravp-NEC
Hi, What is Minimum and Maximum value of reconnectTries and reconnectInterval?
arggh
@arggh
Hello :) I'm using Meteor framework's (and therefore MongoDB node driver's) MongoInternals.RemoteCollectionDriver to connect to another database (on the same MongoDB replica set as the default database) from my app. I believe this is the reason for my MongoDB logs filling with Client has attempted to reauthenticate as a single user messages (severity warning). Any ideas how I should work around this issue?
2 replies
GauravPandey-NECI
@Gauravp-NEC

Hi, we are using MongoDB Node JS driver v3.6.12 in our application. We are handling reconnect attempt scenario if MongoDB is disconnected due to any reason. There are two configurational parameters i.e., reconnectTries and reconnectInterval through which reconnection with the application will be managed. I have check the office documents and source code where only the default values of reconnectTries=30 and reconnectInterval=1000 are given but there is no minimum and maximum values for reconnectTries and reconnectInterval have provided. What could be the minimum and maximum values of these parameters?

Below are the reference to official document and source code which I have referred: 1.https://mongodb.github.io/node-mongodb-native/3.3/reference/connecting/connection-settings/ 2.https://github.com/mongodb/node-mongodb-native/blob/v3.6.12/lib/mongo_client.js#L117-L118 3.https://github.com/mongodb/node-mongodb-native/blob/v3.6.12/lib/core/connection/pool.js#L132-L135

Amrita
@Am0908
hey.. can anyone help me....when i am running this code the i am getting an error which says TypeError: Cannot read properties of undefined (reading 'n'). Code: const insertDocuments = function(db, callback){
const collection = db.collection('fruits');
collection.insertMany([
{
name: "apple",
score: 8,
review: "great fruit"
},
{
name: "orange",
score: 7,
review: "kinda sour"
},
{
name: "banana",
score: 9,
review: "great stuff"
}
], function(err, result) {
assert.equal(err, null);
assert.equal(3, result.result.n);
assert.equal(3, result.ops.length);
console.log("Inserted 3 documents into the collection");
callback(result);
});
}
please help
Luis Ruiz Figueroa
@newmesiss_twitter
hello friends, in my collection I have saved data with this date structure dd/MM/yyyy, h:mm now I want to obtain a list of that data through a range, I have not been able to obtain the data, how can I make the query?
Mohammad Amin Najafi
@manvfx
hi
Brandon
@JavaMonkey_twitter
I have a document with an array of account participants, which define user details including the user id. I am using a $map operation in the projection in order to map certain characteristics like role names. I would like to use a $lookup operation in the context of that mapping in order to lookup the user and construct the display name in the projection. Is that possible?
Zobaidul Kazi
@ZobaidulOfficial
hello,, how are you?
Create MERN App
@mernjs

Hello Everyone

Set up a modern web, mobile & desktop app by running one command.

https://www.npmjs.com/package/create-mernjs-app