Skip to main content

Questions tagged [mongodb-query]

This tag is for questions related to querying and updating MongoDB collections, either through the mongo shell or using a programming language driver.

mongodb-query
0 votes
0 answers
11 views

MongoDB text search with text indexes slower than using $regex

I have a shoes collection with about 1.4 millions records. I tried to get list of shoes containing "Adidas Men's Clinch-X M Running Shoe" phrase. At first, I did not index the "name&...
untaminh1's user avatar
3 votes
1 answer
43 views

How can I filter an ISODate field based only the in the time in MongoDB

I have a collection with the following structure in MongoDB: { "Name": "Test", "StartDatetime": ISODate('2024-05-15T15:00:41.180+00:00'), "...
Guilherme Santana's user avatar
0 votes
0 answers
13 views

Why is parameter allowDiskUse is not working in my JasperReport using MongoDB aggregation query

I've created a Jasper Report using an aggregation pipeline from a MongoDB data source and everything was working properly with small amount of data but now that we have more and more data this query ...
Max Athöz's user avatar
1 vote
1 answer
31 views

mongod multi nested is not working as expected

I have some doubts with $in here , I have following type of documents in my db: { "a": [ { "p": [ { "pid": { "CC": "A"...
R2D2's user avatar
  • 10.4k
-1 votes
0 answers
26 views

I want to sort my data according to nearest location

Hi i want to get data nearby location for that I am providing coordinates so its giving right data but I want all data in sorting order by coordinates like I have searched for vadodara then it should ...
sachin jogchand's user avatar
0 votes
0 answers
17 views

Unable to query using Reference id in morphia 2.4.14 for Reference entity. use of Key<> is deprecated

I have an Entity Book. It contains Language entity. Language entity is stored as DBRef() in database. I need DBRef. @Entity("Book") class Book{ @Reference(language_id) private Language ...
mandar shinde's user avatar
0 votes
0 answers
52 views

Mongo Data API find documents count

Can the total document count be extracted using Mongo Data API? If there are a million records in the Mongo DB collection I need the count. Tried with Mongo data API /find the endpoint. But not sure ...
techqueries's user avatar
1 vote
1 answer
28 views

Create array of elements based on another existing array using MongoDB Aggregation

I need to take a field from a document as input, like below: "participants": ["John", "Peter"], and make the output field like that: "participants": [ { ...
Mathias Hillesheim's user avatar
0 votes
1 answer
35 views

Mongo How to get only available documents by date

I have documents that associated to students: [ { '_id': 1, 'name': 'Anna', 'vacation_start: '2024-01-01', 'vacation_end': '2024-01-03' }, { '_id': 2, 'name': 'Bob', 'vacation_start: '2024-01-01', '...
Zesshi's user avatar
  • 481
0 votes
1 answer
51 views

Batch update of records in MongoDB

I iterated over records in the batch step and in Batch Aggregator I wanted to update all of them at once in mongoDb. Is there a way to update them all together or I need to separately update each one ...
Антон Олег's user avatar
0 votes
1 answer
27 views

I've been trying to apply unique index in combination in mongoDb database in my node.js backend, but unable to get away with the duplicate error

The movie is supposed to be added to the single document named as watchlist of all user, but i tried to apply unique index in combination of profile_id(user) and content_id(movie_id) so that same ...
Arish Ali's user avatar
0 votes
1 answer
23 views

Add a field inside an array within a MongoDB object, with values computed dynamically based on other values inside the same nested array

I have a simple MongoDB array of objects with this structure: [ { "_id": { "$oid": "6688c2f6b79f2bfefb751d5f" }, "date": "06/07/2024&...
vgeorg's user avatar
  • 3
0 votes
0 answers
21 views

Mongo DB Atlas | Aggregation not getting response

Am doing a personal project and using MongoDB Atlas for storing documents. I have the below code app.get('/admin/dashboard', (req, res) => { console.log('Received request for admin ...
Sunil's user avatar
  • 561
1 vote
1 answer
35 views

MongoDB query for points with cutout

In my lootPoint collection I have the data like this: { "_id" : "1856132932", "point" : { "type" : "Point", "coordinates&...
injecteer's user avatar
  • 20.5k
0 votes
0 answers
23 views

Mongodb query doesn't post or put data in deploy

I'm developing a simple forum website. It has a react frontend + node backend, with mongodb cloud as database and AWS Cognito for signup/ verification/ sign in. When a user signs up: 1. create a user ...
Leah's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
1167