Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kevin Luty
    @kevlut
    Just wondering... will mongodb docs be updated... Hard to follow a how-to C# tutorial when all the docs are outdated.
    at least their getting started docs...
    Mahendra Sure
    @MahendraSure
    How can we insert documents in Collections document having Array of three levels deep
    like: below
    Mahendra Sure
    @MahendraSure
    array query mongodb.PNG
    i can do update the document upto two levels deep using $push operator
    is any other way to update the document of this kind
    jatin goel
    @jatingoel018_twitter
    I have a question. Mongo 3.6 provides document level locking. And it uses multiple granularity locks. Now if update request comes in, it will try to get IX lock on db ,then IX lock on Collection and then it will search for all the matching docs and will acquire X lock on them but if it fails it will go to queue and retry. But this problem can come again and again
    How it is handled ?
    Akshay Iyer
    @AkshayIyer12
    hi
    I had a doubt!
    I was exploring $group.
    I wanted to match the data by a specific customer and then group by status and then group by priority on each status ( And retain the data from 1st grouping as well).
    Tanmay Verma
    @tanmay.cs_gitlab
    Helllooo
    my product collection is like:
    db.product.insert({
        name: "shirt",
        translations: [
              {
                  language: "fr",
                  name: "chemise"
              },
              {
                  language: "es",
                  name: "camisa"
              }
       ]
    });
    I need a query so that I will get: { name: camisa }
    if the language is "es"
    Juha Lindstedt
    @pakastin
    { ’translations.language’: ’es’, ’translations.name’: ’camisa’ } 😉
    Christian Amor Kvalheim
    @christkv
    if you want to pull up only the spanish field one possible way (might be others) is to do db.t.aggregate([{$match: {name: "shirt"}}, {$unwind: "$translations"}, {$match: {"translations.language": "es"}}, {$project: {"name": "$translations.name"}}]).pretty()
    that returns a document with the field name in it
    that is the spanish translation
    Tanmay Verma
    @tanmay.cs_gitlab
    Thank you so much!! :)
    Bexanderthebex
    @Bexanderthebex
    I am currently facing a problem in mongodb wherein, I can successfully insert a document based on a model from mongoose repeatedly despite the contraints. I am using docker to contain the mongodb image
    Additionally, when I connect to the mongo shell of the said docker image, wehn I query the inserted document, there seems to be no result but I can see the db and the collection established
    xpol
    @xpol

    http://learnmongodbthehardway.com/schema/schemabasics/ In the last paragraph of Embedding session, it says:

    The third problem is exposed when one tries to perform pagination of the comments. There is no way to limit the comments returned from the Blog Post using normal finds so we will have to retrieve the whole blog document and filter the comments in our application.

    But there is $slice for that: db.posts.find( {}, { comments: { $slice: [ 20, 10 ] } } ). Am I wrong?

    Jordi Pinyana
    @jordipainan
    Hello !! Has anyone worked with mongo Rust driver ? Or if u know another room related, i need to ask something related to save() method on the mongodb rust crate
    thank you
    nsharma098
    @nsharma098
        "_id" : 137,
        "name" : "Tamika Schildgen",
        "scores" : [
            {
                "type" : "exam",
                "score" : 4.433956226109692
            },
            {
                "type" : "quiz",
                "score" : 65.50313785402548
            },
            {
                "type" : "homework",
                "score" : 89.5950384993947
            }
        ]
    }
    How can i remove lowest score of type homework
    flurt
    @flurt
    I'm trying to write mongodb schema for a CMS i'm working on, and i have a User model/schema that contains the password of the user and email etc, i wonder if i should separate an Author model for his/her authentication model?
    s/for/from
    scientronic92
    @scientronic92
    Hi guys,
    I just have an issue with installing mongodb compass community on ubuntu 18.04, I downloaded several versions but when I open it, it start loading then disappear
    If it will not work forever, do you suggest using pycharm with pymongo or NoSQLBooster for mongodb?
    Christian Amor Kvalheim
    @christkv
    Shanon Jackson
    @ShanonJackson
    Mmmmmmm trying to learn MongoDB on a side project wondering if any expert can lend some advice on how to structure this data.
    My user has some listings stored on his document -> the listings are a listing of an "Item"
    Items are part of a Category i.e Item "Hammer" category: "Tool"
    i don't think i want to nest items under their category I.E
    Category : {
    items: [Item, iTem, Item, Item]
    name: "XYZ"
    }
    because then how will my Listing reference a specific item?
    Tirdea Mihai
    @Melcus
    @ShanonJackson disclaimer : I'm no mongo expert by a long shot. Why not separate Categories and Items ( products?) in 2 different collections ? This example might be relevant - http://learnmongodbthehardway.com/schema/categoryhierarchy/
    Christian Amor Kvalheim
    @christkv
    @ShanonJackson I second @Melcus on the suggestion. Sometimes normalisation is in order.
    Jaymin Limbachiya
    @jaymin_TFMC_gitlab
    Hello
    $findRes = $collection->find(
        array('N_NAME'=>' عبدالوهاب علي سليمان')
    );
    I am trying to run this query to find Arabic records
    Jaymin Limbachiya
    @jaymin_TFMC_gitlab
    record is exist but return array is null
    can u please help me to fix lang. issue
    Christian Amor Kvalheim
    @christkv
    you have a white space at the start of your string maybe that is the issue. Mongodb supports utf8 only so you also need to make sure your string is utf8. Not sure what language you are using but you might need to check how you ensure a string is utf8 if the default for the language is not.
    puli peter
    @peterpuli_twitter
    How to fetch the data from mongodb to nodejs and generate the text file or json file
    Lakshman
    @lakshmankashyap
    anybody gave me any link for implement sharding and replica in nodejs
    Luis Dasta
    @lando786
    Can you run commands like .aggregate() on result from a .aggregate()?
    such as:
    db.collection.aggregate(//logic).aggregate(second aggregation)
    najitaleb
    @najitaleb
    Hi. Is it possible to implement a changestream that only triggers when a document is created, and not deleted?
    najitaleb
    @najitaleb
    never mind i figured it out. I just have to put a conditional for the operationType
    Kateryna
    @ekaterina1368
    Hi!
    Does anyone know, what can cause huge schema lock wait time (WT_STAT_SESSION_LOCK_SCHEMA_WAIT)? When that type of lock is used? Thanks!