Questions tagged [embedded-documents]
95 questions
0
votes
1 answer
how to choose the best vector_size for doc2vec?
I am comparing techniques and want to find out what is the best method to vector and reduce dimensions of a large number of text documents. I have already tested Bag of Words and TF-IDF and reduced dimensions with PCA, SVD, and NMF. Using these…

bcosta
- 81
- 10
0
votes
1 answer
Mongoose - Instantiate subSchema without parent
Im trying to create a document and a subdocument separately.
Schema:
const mongoose = require('mongoose');
require('./streets');
const PlaceSchema = new mongoose.Schema({
place1: String,
streets: [{type: mongoose.Schema.Types.ObjectId, ref:…

dash
- 387
- 1
- 11
0
votes
1 answer
mongodb $lookup has_many association from embedded document
I have a boards collection, a lists collection, and a cards collection. An array of lists is embedded in a board document. I am trying to get an output that looks like this:
{
_id: 1,
title: "a board",
lists: [
{
_id: 1,
…

I_A
- 331
- 2
- 14
0
votes
0 answers
Is querying a document by ID faster than querying by embedded document in MongoDB
In my app, I have a User collection and a Board collection. A user document has an embedded participation document, which looks like this: {_id: 1, board_id: 1, role: "admin"}.
(A participation is effectively a join between the board and a user)
I…

I_A
- 331
- 2
- 14
0
votes
1 answer
How to create an array or embedded document from three existing fields in my collection in MongoDB
First of all, I am new to MongoDB, so this question may be quite simple to answer for some of you. I am trying to create an array or embedded document that includes existing fields from my collection. In order words, let's say I have a collection…

eurojourney
- 71
- 1
- 9
0
votes
1 answer
How to remove documents from embedded where name is.. and start is greater than...?
I'm trying to remove some embedded documents from history. I'm using mongodb 3.2
There are two conditions:
"name" must be for example sa
"history" "start" must be greater some date
{
"name" : "sa",
"history" : [
{
…

K_H
- 29
- 1
- 5
0
votes
1 answer
Is there a way to return specific nested fields from a query in MongoDB?
Is there a way to get the amount of money paid per Sport's category?
It can't be restricted only to "John," but in all collection documents.
Expected query return for data provided:
{
{"Fight": [100,95] },
{"Running": [50] }
}
Example of…

Lucas Almeida de Melo
- 177
- 1
- 8
0
votes
1 answer
Update efficiently a ListField of Documents within a list of embedded document if and only if uniqueness within the innermost list is respected
I just came across a scenario that I don't know how to resolve with the existing structure of my documents. As shown below I can obviously resolve this problem with some refactoring but I am curious about how this could be resolve the most…

pgonz
- 1
- 1
- 2
0
votes
0 answers
Delete specific value from Embedded document using Mongoengine when in Embedded Document List Field
I have a two classes in Mongoengine that looks like that:
class User(Document):
user_id = StringField(required=True)
date_modified = DateTimeField(default=datetime.datetime.utcnow())
profile_link = URLField()
email = EmailField()
first_name =…

Giorgos Perakis
- 153
- 2
- 12
0
votes
0 answers
Cannot Insert Embedded entity using Spring data into mongodb
So i wan to add some data but it
{
"_id" : ObjectId("5a0c6748fb3aac66aafe26d7"),
"picture" : "http://placehold.it/150x150",
"name" : "Cablam",
"email" : "leilaware@cablam.com",
"city" : "Rabat",
"location" : {
…

mr scams
- 1
- 2
0
votes
1 answer
Spring Boot, MongoDB: Fields in Embedded Documents getting Renamed
I have one main document:
@Document
public class MainDocument {
private String name;
private String desc;
private List nestedList;
-- More fields/methods --
}
and a document getting embedded:
@Document
public class Nested {
…

B3W
- 166
- 11
0
votes
1 answer
Parent file address, in embedded word doc fields is absoluted
How can made it relative?
I have "WB1.xlsm" in "E:\Administration\Salary".
A word document was embedded in Sheet1: (Microsoft Word Macro-Enabled Document object)
I did Copy & Paste Cells(2,1) in the embedded word doc as Paste Special> Paste…

Tuberose
- 434
- 6
- 24
0
votes
0 answers
how to update document and an attribute of embedded documents array in mongo
I have an array of documents like this:
activity: [{
"_id" : "0000a021d96b12e37828db6a583a9632",
"user_guid" : "86f8dff81756ec760b9082d77753e51d",
"start_date" : ISODate("2017-02-04T00:00:00.000Z"),
"end_date" :…

Ajay
- 4,199
- 4
- 27
- 47
0
votes
1 answer
Mongoose - How to save a document with an embedded document? Tried doing a push cannot get it to work
I have looked at https://stackoverflow.com/search?q=Mongoose+save+a+document+with+an+embedded+document and How to populate nested Mongoose embedded documents and still have not figured out what I am doing wrong. I want to simply save a user document…

JTime
- 1
- 3
0
votes
1 answer
Query an object referencing a collection field and another field from it's embedded collection?
I have a User collection with an embedded Address collection. I want to find or initialize a document with user email and embedded document address' field zipcode. Both these queries return the user object…

mohakjuneja
- 161
- 3
- 6