175,440 questions
3
votes
1
answer
65
views
How to reduce logging level in mongodb/mongodb-atlas-local
Problem:
I'm using the mongodb/mongodb-atlas-local Docker image in our CI/CD pipeline for running tests. While the verbose logging is acceptable for local development, it becomes problematic in CI/CD ...
0
votes
1
answer
59
views
MongoDB Aggregation $text search fails with none existing collection in the error returned in Node.js
I'm encountering a very strange issue after switching a MongoDB aggregation pipeline from using $regex to a more efficient $text search. My application code is correct, but the server returns an error ...
12
votes
1
answer
9k
views
What is the difference between a cluster and a replica set in mongodb atlas?
I'm taking the Mongodb University M103 course and over there they gave a brief overview of what a cluster and a replica set is.
From my understanding a cluster is a set of servers or nodes. While a ...
24
votes
4
answers
23k
views
How to parse and read "_id" field from and to a pydantic model?
I am trying to parse MongoDB data to a pydantic schema but fail to read its _id field which seem to just disappear from the schema.
The issue is definitely related to the underscore in front of the ...
28
votes
7
answers
66k
views
Add a new attribute to existing json object in node.js
I have an object like this
==================records=========={ Id: 5114a3c21203e0d811000088,
userId: 'test',
sUserId: test,
userName: 'test',
url: 'test',
Title: 'test'
}
I need to add a ...
0
votes
1
answer
185
views
Transforming Array values in MongoDB
I am new to MongoDB, here i am trying to transforming the data inside each documents with the given data.
Please help me to complete this task.
getconvaggregate1 collection:(existing)
{
&...
4
votes
4
answers
773
views
mongoDB GUI that supports the new mongodb authentication system [closed]
is there a mongoDB GUI that supports mongo 2.6+ authentication?
I have a mongoDB 3.0.3 server and can't manage it with robomongo anymore. I also tried MongoHub with no luck :(
I want to access ...
4
votes
2
answers
3k
views
Pytest- use a generator for mark.parametrize
I have a mongo db with a very large collection that I need to run tests on with Pytest.
I am trying to do it the usual route of using the mark.parametrize dectorator but with pymongo.cursor Cursor ...
0
votes
0
answers
44
views
Reading a collection in mongodb
How do I connect to a Mongodb?
I am trying to read the contents of a collection called "student".
onsole.log("001");
const dotenv = require('dotenv')
dotenv.config()
const mongodb =...
Advice
1
vote
2
replies
68
views
Connecting to Mongodb from inside Docker container
I want to connect to my mongodb running on my localhost machine (dockerhost) from inside a docker container. For that I have to allow connections other than localhost. Unfortunetly when using --...
1
vote
2
answers
12k
views
Error creating bean with name 'mongoTemplate'
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoTemplate'
defined in class com.socketcruiter.config.SpringMongoConfig: Instantiation of bean failed; ...
1
vote
1
answer
46
views
Jest + Testcontainers MongoDB: Intermittent ECONNREFUSED errors running integration tests
Problem
Starting November 10th, my Jest integration tests began failing randomly with MongoDB connection errors. The tests use @testcontainers/mongodb v11.5.1 and mongodb v8.0.12.
Error:
...
1
vote
1
answer
2k
views
Is it possible to get the actual class name instead of the proxy class name from a lazy loaded object using Doctrine's MongoDB ODM?
Prior to beginning upgrade work to update my application to Symfony 3, and with it upgrading several libraries (including Doctrine) to more recent versions, I was able to compare references in a query ...
2
votes
2
answers
4k
views
Unable to start up mongod due to missing featureCompatibilityVersion document. Docker issue
I have a dockerized service, It consists in a server with an API REST and a mongoDB storage system.
First of all I have these two images of docker hub:
mongo:3.6.0
node:alpine
I'm trying to create a ...
0
votes
1
answer
58
views
mongodb apply $not to $and - is there some ideas?
I'm trying to do something like this:
select * from table where not (a=3 and b=4 and c=3 or x=4)
I would expect this to work:
db.table.find( {
$not : {
$or : [
{ $and : [ { a : 3 }...
15
votes
1
answer
18k
views
Mongo DB Error "The server is in quiesce mode and will shut down"
I'm currently getting a Mongo error - "NotPrimaryError: The server is in quiesce mode and will shut down".
I have a CRON job that runs every day after midnight that just retrieves some stuff ...
2
votes
1
answer
77
views
How to combine diacritics-insensitive, case-insensitive and partial search in MongoDB?
I'm trying to implement a robust search function in my NestJS/Mongoose application that can handle partial matches while being case-insensitive and diacritics-insensitive (ignoring accents).
My ...
1
vote
0
answers
51
views
PySpark/MongoDB Connector DataException: dataType 'struct' is invalid for 'BsonArray' during ETL
I am running a data ingestion ETL pipeline orchestrated by Airflow using PySpark to read data from MongoDB (using the MongoDB Spark Connector) and load it into a Delta Lake table. The pipeline is ...
0
votes
5
answers
18k
views
throw new TypeError(`Invalid schema configuration: \`${name}\` is not ` +
I wrote the below schema. But while running it gives me an error -- throw new TypeError(Invalid schema configuration: \${name}` is not ` + --- can someone help me why does this error comes?. Below ...
0
votes
1
answer
100
views
How can I clone objects without retrieving them in MongoDb?
I use MongoDb in C#. Shown below is an object I want to clone, but also I want to merge it into the same collection.
This is a simplified version of the document I use:
class MyDocument
{
public ...
0
votes
1
answer
471
views
how to use custom service name in mongodb+srv scheme?
According to the documentation https://www.mongodb.com/docs/v4.4/reference/connection-string/#std-label-connections-dns-seedlist mongodb+srv://server.example.com/ is equivalent to _mongodb._tcp.server....
Best practices
1
vote
0
replies
31
views
Kotlin Serializer: Different SerialName per Serializers id/_id
Using the "MongoDB Kotlin Driver" is there any best practices to define the data model? Particularly regarding the _id vs id while sharing the same data model to serialize through different ...
0
votes
1
answer
57
views
MongoDB connecting on localhost but not on Render app
I'm creating a forum for my physics engine website so that people can share their saves with everyone. It works on localhost with MongoDB, but when I upload it to Render, I get an error that says,
...
10
votes
4
answers
15k
views
TypeError: mongodb property insertmany is not a function
db.col.insertMany(
[
{
"_id" : "tt0084726",
"title" : "Star Trek II: The Wrath of Khan",
"year" : 1982,
"type" : "movie"
},
{
"_id" :...
3
votes
2
answers
9k
views
MQTT Broker - Mosquitto Event Logging
Is it possible to use the MQTT Broker Mosquitto on Ubuntu 12.04 to log all events such as messages published to all channels, subscriptions, client connections/disconnections and errors to a log file ...