All Questions
Tagged with mongodb-atlas mongodb-query
91 questions
0
votes
0
answers
24
views
"Query Targeting: Scanned Objects / Returned" Exceeding 1000 – How to Fix?
I'm using MongoDB Atlas and noticed a warning in the Performance Advisor and monitoring dashboard:
"Query Targeting: Scanned Objects / Returned" has gone above 1000
From my understanding, ...
0
votes
0
answers
29
views
How to create search index for an attribute and query it which has nested dynamic fields in mongoDB atlas search?
I want to create an index on qualityConfirmations attribute and query it. As qualityConfirmations has dynamic fields at the root level for eg. 228, 234, and inside that I need to query for "...
0
votes
1
answer
120
views
mongoDB $lookup with $search pipeline
I have two collections:
store_group collection:
{"_id": ObjectId("674fe7cc4e65df54a0db23b5"),
"stores": [
{"id": 101, "name":"abc&...
0
votes
1
answer
117
views
How to query MongoDB Atlas from a shell script?
I've been trying to write a shell script to restore a MongoDB Atlas instance using a snapshot, and then query said instance to validate the results. While I can use API calls to get the snapshotIDs ...
1
vote
1
answer
110
views
How to calculate embedding vectors using the OpenAI API for MongoDB vector search?
I am trying to follow the example from the official MongoDB documentation.
It mentioned that the search vector was based on the string "historical heist" using the OpenAI text-embedding-ada-...
0
votes
1
answer
134
views
MongoDB online archival ObjectId vs datefield
I'm trying to archive data which is older than 4 months in a mongodb collection. There are existing documents in the collection.
As per mongodb, for standard collections we can either use date fields ...
0
votes
0
answers
53
views
How to Optimize MongoDB Aggregation Pipeline with Keyword Search and Sorting for Large Dataset?
I am working on a Laravel project that uses MongoDB via MongoDB Atlas. I have a collection with millions of documents, and I am running a complex search query that includes keyword search, sorting, ...
0
votes
1
answer
45
views
Mongodb Compass: date quesry returns noting
I use Mongodb Atlas to query data from collestion. Data like this
{
"_id": {
"$oid": "65253ba83d0450a7bcf2e4ad"
},
"name": "Andrea Le",
&...
0
votes
0
answers
86
views
MongoDB find query with compound index taking more than 300ms
I have a MongoDB collection with 300,000 documents, and I'm experiencing slow query performance for a specific query. The document structure is as follows:
{
"_id": 268621,
"...
-1
votes
1
answer
822
views
How to implement fuzzy search in MongoDB atlas to achieve precise match
If my search query is "Caramel Cake", then the search results are ["Caramel Cake", "Red Velvet Cake", "Chocolate Truffle Cake", and many more] using my existing ...
0
votes
1
answer
103
views
Unable to take dump using mongodump
I have an atlas mongoDB and i have connected to the database through mongoshell using below the command.
mongosh “mongodb+srv://hostname.mongodb.net/?authSource=%24external&authMechanism=MONGODB-...
1
vote
0
answers
204
views
Encryption at rest - best practice for Mongodb Atlas
I'm building a SaaS solution in 2023, using MongoDb and Atlas (MERN stack) and want to ensure that the application is secure.
Is there a best practice on how to encrypt data at rest? Whilst data still ...
0
votes
1
answer
593
views
MongoDB Altas Compound $search: how to combine one AND condition and two OR in the same search query?
I have a collection with Atlas search index, created for full-text search by two fields. Also, I need to search only through records with a specific value of a third field:
Collection {
name: String ...
3
votes
1
answer
568
views
How to fix MongoDB Data API error: "Header missing: please add content-type: application/json or application/ejson to specify payload data types"
I was attempting to insert a document into MongoDB Atlas, via the Data API.
However, the API kept returning the following error:
Header missing: please add content-type: application/json or ...
1
vote
0
answers
121
views
How to get a 'distanceField' in Atlas search?
When I use $geoNear I can return a calculated distance by including the "distanceField" which is extremely useful when displaying items and their distance from a location. My code for this ...