Is there any way we can query and get location data using mongodb geospatial query that matches the following criteria?   Getting all locations that are part of intersection between two boxes or in general two polygons.   For example below can we get...
Suppose we have a collection of raw data:  { "person": "David, age 102"} { "person": "Max, age 8" }   and we'd like to transform that collection to:  { "age": 102 } { "age": 8 }   using only mongo(d...
I have a multiple collections , I used the separate collection & foreign key approach , and I want to join this collections to build a nested collections. this is my schemas of collections:  const SurveySchema = new Schema({ _id:{ type: Schema.Ob...
This is my collection:   {         "_id" : 10926400,         "votes": 131,         "author": "Jesse",         "comments" : [                 {                         "id" : 1,                         &...
I have a JS object norm which I want to use inside mongo aggregation pipeline, like this:    var norm = {      1: 1,      2: 1.16,     3: 1.413,     4: 1.622,     5: 1.6,     6: 1.753,     7: 3.001,     8: 2.818,     9: 3.291,     10: 2.824,     11:...
I want to join collection. before, I used only lookup, so that I could get separated field that is joined. but I need to get result similar mysql join. I noticed there is $lookup and $mergeObjects for this action but not working well.  user collectio...
My documents in the orders collection has _client key, which is an ObjectId references to another entity in another collection. The collection could be organization and could be users - I mean - it's variable collection. I want to tell Mongo to l...
I have a mongodb collection called cases and inside cases I have an array of cases per company object.  So the structure is:    Inside each case I want to use the createddate (which is a string) and endDate (also string) and convert it to a mongodb d...
So I'm doing a search with mongodb / mongoose. I have a post document and this post document has a comments property which consists of comment IDS. The goal of this search is to gather all the user's posts where a comment was added today.   I...
I'm using the node-geoip module and performing an aggregation query. The schema against which I am performing the query looks like this:  var mongoose = require('mongoose'); require('./location.js');  module.exports = mongoose.mod...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.