Category "mongodb-query"

Learning Mongodb and having a simple issue with MongoDB

I have the following C# code as I'm learning MongoDB but I get the following error even though this code is straight out of the mongodb documentation! Is there

Mongo atlas search on two fields in documents by a search string and get the list of matching documents grouped by its fields

eg. Need to search on two fields - "name" and "text" for a string "Mercedes" in the given documents {"_id":{"$oid":"5a9427648b0beebeb69579e7"},"name":"Mercede

How do I update a MongoDB collection with values from another collection?

I have a MongoDB collection called properties and another collection of new data in a collection called newProperties. I want to update a single field (amoun

group in mongo excluding null values

I have mongo query which does the group operation on the documents. I have almost got the expected results except that I want to refine the results without emp

How to read a specific key-value pair from mongodb collection

If I have a mongodb collection users like this: { "_id": 1, "name": { "first" : "John", "last" :"Backus" }, } How do I retrieve name.first from

mongodb update/upsert that adds data to the existing document instead of replacing data in an existing document

I am using an upsert using mongodb's Jensseger PHP library. Every time I add new data to the document it updates the value of the field if the field names are

How to find items in a collections which are not in another collection with MongoDB

I want to query my mongodb to perform a non-match between 2 collections. Here is my structure : CollectionA : _id, name, firstname, website_account_key, emai

In MongoDB, method to keep the previous value of a field in a different field while updating an object?

Say I have an object with field state, I want to update this field, while keeping the previous value of state in previous_state field. First, I have tried to ma

MongoDB Merge Equivalent Collections

I have two collections with same structure and want to merge them in aggregation result and query & sort over them after merging. E.g.; First collection:

MongoDB Driver Builders<dynamic> dont work on equal to date

I am unable to get the result I wanted when I try to get Date equal to. FilterDefinition<dynamic> searchFilter = FilterDefinition<dynamic>.Empty; st

MongoDB Driver Builders<dynamic> dont work on equal to date

I am unable to get the result I wanted when I try to get Date equal to. FilterDefinition<dynamic> searchFilter = FilterDefinition<dynamic>.Empty; st