Last week I upgrade Fedora to the brand new 28 release, which came with a mongodb upgrade to 3.6. See How to repair mongodb service after an upgrade to Fedora 28? for how I managed to resolve my first problem which was that mongod would no longer…
In current setup there are two Mongo Docker containers, running on hosts A and B, with Mongo version of 3.4 and running in a replica set. I would like to upgrade them to 3.6 and increase a member so the containers would run on hosts A, B and C.…
Not able to run mongodb instance in ERROR log level. As defined by mongodb documentation, by default verbosity is 0 which includes information messages. But increasing verbosity to 1-5 will include debug level messages. I need only error messages to…
MongoDB introduced change streams in their 3.6 release.
I wanted to implement mongo change stream in my code and wanted to understand how it works. I will implement using the java driver and it's pretty clear.
But I wanted to know if there is there…
MongoDB scripting is still pretty cryptic to me, and stuck with this problem on a 3.6 server lacking the fancier operators from 4.2.
How to increase a date field with one second value in a MongoDB 3.6?
For example, I'd like to do something like…
MongoDB v3.6.4: After migrating from mongo 3.4 to 3.6
From the shell I am able to startup the db and connect to it with authentication.
mongod --auth --port 27017 --dbpath /data/db
However when I start mongodb with brew the authentication does not…
I'm not sure how to phrase this, but basically I want to group documents by a field from a child array, then I want to group by a field in the parent (root) document, but retaining the prior grouping.
I hope an example would help here.
Let's say I…
I have the following collections in mydb database:
purchases: it contains documents in the following format:
{
_id: ,
name: , //customer name
purchasedItems:
0: < Object >
i_name: //…
I'm querying a MongoDB collection to extract informations, thus only aggregation operations are possible (i.e. no update()).
From several documents shaped like these, where each contains an embedded array with at least one document with a partNum :…
I an to fetch data from "udatas" schema with lookup "productdata". I quess this works with mongodb 4.x but not with 3.6. Any Ideas?
Udata schema
{
"_id" : ObjectId("5f6357500153c4d59b38f1e7"),
"uId" : "112345",
"pId" :…
What is the difference of a unique vs a non-unique index in Mongodb in terms of
1. write performance - i believe all indexes are defined as B-tree in mongodb.If so,is there any material difference between insert performance in a collection having…
I have this collection. I am trying to add object(item = {label: "Chrome", value: "chrome"}) to the array only if the value is unique, i.e. insert the whole object, item in the array foo only if array foo doesn't have any other object with the same…
I want to solve this with Aggregation if in other way possible please do let me know
I Tried This with aggregation :
db.CLV_MATERIAL_AGING.aggregate([ { $match: {"Material_Number" :
"000000000810000010"}},
{
$group: {
_id: 'null',
…
With the limited documentation available on MongoDB changestreams which they introduced version 3.6 onwards, I am not able to conclude if MongoDB changestreams let us listen to system collection changes.
Currently, I am interested in system.profile…
I'm following a course from mongodb university to learn new features in the release 3.6, and I'm unable to resolve why my validator is invalid.
This is how I created the collection:
db.getSiblingDB("TSA").createCollection("claims", {
validator:…