Questions tagged [mongodb]
MongoDB is a scalable, cross-platform, high-performance, open source, document-oriented NoSQL database. It supports a large number of languages and application development platforms. Questions about server administration can be asked on https://dba.stackexchange.com
mongodb
23
questions
0
votes
0
answers
10
views
Authentication failed while connecting to docker-compose mongodb via springboot application
docker-compose.yml
version: '4'
services:
mongodb:
image: mongo:7.0.5
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ...
-2
votes
1
answer
30
views
Get all keys in a dictionary [closed]
I have a collection of objects that contain a dictionary, and would like to extract only the keys and not the values in the dictionary (which are much larger than the keys, unlike in the example below)...
-1
votes
0
answers
11
views
Having issues with a messenger clone
So everything was working fine until I decided to add a header component to my messenger clone.This specific problem has returned null and crashed my application like 5-6 times. Can anyone help why ...
0
votes
1
answer
21
views
Mongo searching in a nested query
I have documents like this
{ "_id" : 1, "item" : { "code": "ABC1", skus: [ " c1", "c2 ", "c3"] }
{ "_id" : 2, "item&...
1
vote
0
answers
13
views
Java MongoDB not mapping extended classes
I have a base class Person and 2 classes that extends from it. When I insert instances of these classes into the database, it keeps all the info about the extended classes as shown below.
Below is the ...
0
votes
0
answers
12
views
Laravel MongoDb Aggregation For unique and null
I want to retrieve documents from mongoDb by using MongoClient for parent_id is only first of same and parent_id is null.Only one aggregation.
$search[] = [
'$group' => [
...
0
votes
1
answer
20
views
Can't use variable field of mongodb in javascript
I have retrieved one document from mongodb, in that I have one array and I want to loop through that array but I can't do that. If I loop through that it consider whole array as one element, this is ...
0
votes
0
answers
15
views
Typescript: Circular Definition and Cannot Find Module Errors During Build
I cloned a project from GitHub and encountered some issues while trying to build it. I've already installed all the necessary dependencies using npm install, and I'm running MongoDB through the mongo ...
-1
votes
0
answers
19
views
Sum in Lookup in Monogo C# [closed]
List<abcd> data = new List<abcd>();
data.Add(new abcd { name = "tbl1", fieldname = "total_amount" });
data.Add(new abcd { name = "tbl2&...
0
votes
0
answers
21
views
How to know when $merge as completed in MongoDB
I have an aggregation pipeline ending with a $merge stage.
db.collection("mycoll").aggregate([..., {$merge:{into:"myview"}}])
I have to generate materialized views at run-time and ...
0
votes
1
answer
18
views
Can't connect to MongoDB server with Tableau or Python but can with Compass on Windows 10
It was extremely easy accessing MongoDB server by pasting conn string into MongoDB Compass on Windows 10 but when it comes to Python or Tableau it returns errors
For Python its either timout or:
...
1
vote
1
answer
36
views
Sort by field of an object in array where id matches the specific element object id in the array NestJS , Mongodb
I have following result data which is not properly sorted according to my needs
[
{
"_id": "defmongodb_objectId",
"categories": [
{
"category&...
0
votes
0
answers
21
views
Each array should contain unique element using Facet in MongoDB
Here I'm adding the Mongo playground URL how my schema structure look like
Now I want 3 unique array elements which are mostPurchased, latestRewards and suggestedRewards.
So I'm trying to achieve by ...
0
votes
0
answers
24
views
Prevent MongoDB's bulkWrite from returning (too much) data
I use MongoDB with the Node.js driver to bulkWrite around 10,000 rather large documents (1-5 MB per document) from an AWS scheduled task to MongoDB instance every hour.
I would expect the inbound ...
-2
votes
0
answers
17
views
MongoDB inserts super slow after indexing [closed]
I have a MongoDB collection that is almost 1 TB in size. The collection already has indexes in place for faster querying. However, when I try to add new data, the insertion process becomes extremely ...