Questions tagged [mongodb-compass]

MongoDB Compass is MongoDB’s own GUI tool for database management, visualization, and CRUD operations. It supports the latest MongoDB versions and is available on Linux, Mac, or Windows. mongodb-compass tag should be used when posting questions related to this tool.

The GUI for MongoDB. Visually explore your data. Run ad hoc queries in seconds. Interact with your data with full CRUD functionality. View and optimize your query performance. Available on Linux, Mac, or Windows. Compass empowers you to make smarter decisions about indexing, document validation, and more.


Development:

All versions of MongoDB Compass are source available and free to use. You can find the source repositories for MongoDB Compass at https://github.com/mongodb-js/compass/.

Running Compass locally requires Node.js and npm:

  • Node.js: ^12.4.0
  • npm: >=6.13.0
npm install
npm start [compass|compass-readonly|compass-isolated]

For issues, create a ticket in JIRA Project.

Is there anything else you’d like to see in Compass? Submit suggestions in our feedback forum.

478 questions
0
votes
1 answer

Search including special characters in MongoDB Atlas

I faced with the issue when I try to search for several words including a special character (section sign "§"). Example: AB § 32. I want all words "AB", "32" and symbol "§" to be included in found documents. In some cases document can be found, in…
0
votes
2 answers

MongoDB query that looks for documents with lowercase values

Is it possible to make a MongoDB query that searches a field for completely lowercase string values? Something like this pseudo query perhaps? { address: { $eq: { $toLower: "$address" } } } ...that would return docs with data like: { "address":…
Benji
  • 310
  • 3
  • 12
0
votes
0 answers

connection to 104.210.34.196 closed error in MongoDB compass?

This doesn't have much to do with the actual code, but enter image description hereI've already configured the network access to the IP address 104.210.34.196 on the actual database on Atlas, but whenever I try to connect using compass, it gives me…
0
votes
1 answer

How to use mongodb compass aggregation builder too find total count of documents that have a field that are only a number

Hi I'm new to the aggregation tool in mongoDB Compass and I've been playing around with queries on the database and have been trying to understand the documentation. I'm trying to do an analysis on database data that have a field 'totalAssets' and…
0
votes
0 answers

MongoDB Atlas Node.js connector super slow vs. Compass super fast

I'm using an Atlas M10 cluster. The same query that takes <1 second on Compass takes 10 seconds using the Mongo Node.js client. It's not application logic related, because I've isolated everything application-side, and did the query alone. Still the…
Pedro Rabbi
  • 193
  • 1
  • 12
0
votes
0 answers

Mongo Compass, import json file into collection with data

I'm goint to import json file into collection with data Mongo Compass I read the documentation but didn't say if the collection has data what will happen: it will insert all data as new documents without deleting the data that has the collection? it…
pmiranda
  • 7,602
  • 14
  • 72
  • 155
0
votes
0 answers

MongoDB recovery database from Compass

I was working on a new project. There was a lot of data that I needed to add locally. I used mongoose and nodejs for this. But windows 11 where the project is installed does not open now. Fortunately, I have ubuntu on my computer and I can access…
0
votes
0 answers

Problem When embedding JSON Object inside another object by DBRef

I wrote the code to try DBRef Concept: The Students Collections has: { "FirstName": "Omar", "LastName": "Ali", "IsFired": true, "FacultyID": { "$ref": "Faculty", "$id": "633d5fca2bed487dd7eb4e11", "$db":…
IBdr
  • 1
  • 2
0
votes
1 answer

MongoDB Compass multiply counts on one result

I'd like to ask you for help. I have a MongoDB collection, here's a simplified example. date user 2022-09-25 A 2022-09-25 A 2022-09-25 B 2022-09-26 A 2022-09-26 A 2022-09-27 A 2022-09-27 B 2022-09-27 B 2022-09-27 B And I…
td2003
  • 53
  • 1
  • 7
0
votes
1 answer

How do you set up authentication in mongoDB compass? Every solution uses the mongod terminal not the compass terminal

What I am trying to do: I want to have my schema require a log in to order to gain access From my understanding, you must first use the --auth flag to enable authorization. When I do this in the compass shell, it says auth is not…
Wayne
  • 660
  • 6
  • 16
0
votes
1 answer

Syntax in $or statement

I have the following filter which I am trying to test in MongoDB Compass: {$or: ["OwedTaxes": {$regex: "$"},"OwedTaxes": {$exists: false}]} Meaning the OwedTaxes field contains a "$" sign or does not exist. There is a syntax error but I don't…
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
0 answers

pass value from different Collection inside subquery in Match operation in Mongodb

I have 2 collection: Company and Stores. I used $lookup on Store collection using the storeIds on Company collection. I need to pass 'Company.Year' value to Stores.Statuses.Year inside $Match operator. Any help is appreciated. Company: [ { "_id":…
0
votes
1 answer

Mongo adding a field to a specific object in an array of objects using updateOne during a bulkUpdateOps

Use case Adding a field to a specific object in an array of objects using updateOne during a bulkUpdateOps Blockers I have been unable to find a way to identify and update a specific object in the subdocument array of a specific record. I only have…
0
votes
1 answer

How to group by two fields mongoDB aggregation

I have the following documents in mongoDB: { _id: "YYYY-MM-DD", workedTimes: [ {..., driver: {username: string} } ] } every workedTime has a driver with a userName prop, and i want to group them by date and driver.username with a…
Dante
  • 41
  • 2
  • 6
0
votes
0 answers

I am having issues while installing MongoDB compass on my mac locally

I am having issues while installing MongoDB compass on my mac locally. How to resolve the issue?