Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged mongodb

0 votes
1.5k views
1 answer
    Let's say I have two collections: Products and Categories. The latter collection's documents have 2 fields: _id (BSON ObjectId) Name (String) The latter ... as ObjectId(...)'s rather than as Strings? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    In a previous question I wanted to obtain a count of the resulting groups using pipeline operations. As suggested, I used the following: db.test.aggregate( ... solution to achieve what I am trying to do? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    It seems the answer in this thread (Accessing Meteor production database) does not work anymore when you want to access a meteor production database in 2016. ... database as easily as I did in 2015? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I have a collection of documents in MongoDB that looks like: {"_id": 1, "array": [{"id": 1, "content": "..."}, {"id": 2, "content": "..."}]} {"_id": 2, " ... 'array': [{'id': 1}, {'id': 2}, {'id': 1}]} See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.7k views
1 answer
    I have the following mongo data which looks like this { eventType : "mousedown", eventArgs : { type : "touchstart", elementId : "id1" }, creationDateTime : ... " }, What is the correct way to do so? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    I am trying to export a field from a subdocument with no luck. Here is my syntax; mongoexport -d test -c accounts -f account_number,situses. ... for directly referencing a subdocument has been removed. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.1k views
1 answer
    I use mongodb (I'm new in mongodb) to store data about my power consumption , each minute there is a new record, here is an example : ... public List<Mesure> findByDateGreaterThan(Date date, Sort sort); See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.1k views
1 answer
    i'm trying to do a pretty simple operation, pull an item from an array with Mongoose on a Mongo database like so: User.update({ _id: fromUserId }, { $pull: ... ", "mongoose": "^5.0.7", Thanks in advance. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    How do I find the document with the maximum uid field with map-reduce in pymongo? I have tried the following but it prints out blanks: from pymongo ... been a number of bomb explosions and killings." } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I was wondering if it would be possible to define a model stored into another one. I have this kind of structure: Model Contact String name Model ... and this cause trouble when updating or saving... See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    For a given record id, how do I get the average of a sub document field if I have the following in MongoDB: /* 0 */ { "item" : "1", "samples" : [ { ... 1). So the average should be $avg (1 + 3) = 2 Thanks See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    For example I have following collection: db.names.find({}) { "_id" : ObjectId("5768d9b4bc6f464899594570"), "name" : "t1", "loglevel" : "ERROR" } { "_id" : ObjectId( ... {$sum: 1}, else: {$sum: 0}}}} }} ) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    Hey is there a way to add to each document retrieved from mongo a counter? So lets say we have users : {_id, name} in mongo . I want to fetch ... ] so this counter field would be generated on the fly ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    In mongos shell how would I go through and change every document in reviews.category to "category 2" My Documents Structure: { "_id": ObjectId(" ... { "category": "category 1" } } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I was unable to find the proper way to call shell command from Mongo C# driver version 2.7.2 public async Task RsStatus() { var res = await _admin. ... one supply me with an example ? Thanks in advance. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I love MongoDB, and a certain little ambiguity occurred to me and I was wondering if anyone had seen this before and possibly would know the answer :- ... Is the conventional wisdom simply not to do that? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I wonder what I am doing wrong. I use Sailsv0.10 and mongo2.6.0 and want to update an array field (using $push) in a collection via ... a ObjectId type conversion Problem of the Sails-Mongo Adapter See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I have a collection with documents similar to such: { "_id": ObjectId("xxxxx"), "item": [ { "property": ["attr1", "+1"] }, { " ... there any way to achieve this behavior using the aggregation framework? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I run this command: db.ads_view.aggregate({$group: {_id : "$campaign", "action" : {$sum: 1} }}); ads_view : 500 000 documents. this queries ... aggregate framework use indexes, how to index this query. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    I am trying to iterate through a loop in python but the nested loop is not reaching the incremental element. Is there any way other than using range ... != duplicated_entity("id"): array2.append(second) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.9k views
1 answer
    I'm quite new in mongodb, now I need to count a $lookup field, is it possible? I had something like this: result = await company.aggregate([ { ... do that? Please some experts advice, thanks in advance! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    Using the MongoDB persistance engine in joliver/EventStore causing the error Unknown discriminator value 'MyEvent'. The issue is only caused when I try to ... tried almost all kind of serializer options. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    In the MongoDB collection I'm querying, each document represents an item at a specific time. When updating a document, a new document is created with ... while the correct result is an empty result set. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I am working on golang project, recently I read about docker and try to use docker with my app. I am using mongoDB for database. Now problem is ... service listens on port 8080. EXPOSE 8080 EXPOSE 27017 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I have an image gallery with meta stored in mongo. Every time the web site query matches some number of stored images i would like the documents ... hoping to perform find and update in single query. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I have a collection that I'd like to update. The field is given programmatically, so I'd like to do something like this: var update_string = 'coordinates ... to no avail. How do I accomplish this? Thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I have 2 databases I want to query from, but I only get results from one. I'm using mongoengine with python and graphene (it's my first time). ... at the top level even before class UserModel or Workout. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    const express = require('express') const app = express() //initialised express. using express by requiring it. //conecting the server to browsers const ... [ds127938.mlab.com:27938] on first connect' } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...