Questions tagged [nested-documents]

A data/object structure where documents are contained within other documents. Relates to indexing and used in search and database platforms and engines like mongodb, solr and elasticsearch

A data/object structure where documents are contained within other documents. Relates to indexing and used in search and database platforms and engines like mongodb, solr and elasticsearch

64 questions
1
vote
1 answer

Accessing nested documents within nested documents

I'm having a problem that is really bugging me. I don't even want to use this solution I don't think but I want to know if there is one. I was creating a comment section with mongodb and mongoose and keeping the comments attached to the resource…
Stephen Agwu
  • 1,013
  • 2
  • 15
  • 29
1
vote
1 answer

How to sum the value of child documents in a specific matching search criteria using solr?

I have the following indexed documents { "id":"data1", "isParent":"1", "_childDocuments":[ { "description":"Benefit and Payroll consultant with HR team ", "isParent":"2", "exp":2 }, …
1
vote
2 answers

Querying on nested document in MongoDB

I have a complex document structure like below - { "Application": { "DEF": { "Year": { "2018": { "Quarter": { "Q1": { "Microservice": […
Souvik
  • 865
  • 6
  • 8
1
vote
1 answer

Solr querying nested documents with ChildDocTransformerFactory, get "Parent query yields document which is not matched by parents filter"

Some background: The data involved is catalog data, with three nested objects: Products, Items, and Skus, in that order. We have a docType field on each record as a differentiator. The "id" field in our data is unique within datatype, but not…
dj_segfault
  • 11,957
  • 4
  • 29
  • 37
0
votes
0 answers

How to get value of the projected field from MongoDB document using java driver?

I have a nested MongoDB document as shown below: { "product_id": "123", "properties": { "Category": { "type": "object", "Electronics": { "type": "object", "Mobile": { "type": "string" …
0
votes
1 answer

How to exclude grouped documents in solr

So in Solr we have the following use case: a collection of keywords with keyword (the actual phrase that we query by), a match_type(which can be negative, exact or broad). Currently we have 2 field Types, with different set of query and index…
Andreea
  • 11
  • 1
0
votes
1 answer

Aggregate Nested Document MongoDB

I have this sample data, { _id: ObjectId("50b59cd75bed76f46522c34e"), student_id: 0, class_id: 2, scores: [ { type: 'exam', score: 57.92947112575566 }, { type: 'quiz', score: 21.24542588206755 }, { type: 'homework', score:…
0
votes
0 answers

getting Undefined index error when creating embeds many doc without primary key using Model in Laravel mongoDb

I'm first time using MongoDb with Laravel. I have one EntityForm Model as like below
0
votes
1 answer

Push an object to a nested array within a document but use a value from a field in the root document

I've been scratching my head with this problem. I've attempted to search for a solution but I didn't find anything relating to my specific use case. Would anyone be able to help me out? Say I have a collection of "discount" documents, and…
Dexter
  • 175
  • 1
  • 12
0
votes
1 answer

Display value within top level document of nested document field value in mongoDB

This is the document from where i wanted to pull data from { "_id" : ObjectId("635cbfee36945e4a79b0af70"), "EID" : 200, "EName" : "ram Kumar", "ESalary" : 50000, "EAddress" : { "AddL1" : "fjwh…
0
votes
1 answer

SOLR nested document query unexpected results

I created a query to find parent documents in SOLR by filtering on both child and parent properties. I have simplified it for this example to: {!parent which='content_type:"parent" AND field_a="value" AND field_b="value"'}((child_field_x:("VALUE" )…
Frank
  • 530
  • 5
  • 15
0
votes
1 answer

how to filter scores from the nested document using (MONGO DB OR PYMONGO).if all the scores of a particular person is greater than 40

[ { "_id": 5, "name": "Wilburn Spiess", "scores": [ { "score": 44.87186330181261, "type": "exam" }, { "score": 25.72395114668016, "type": "quiz" }, { "score":…
0
votes
1 answer

Updating nested MongoDB documents is not working

I'm trying to create update functionality for nested documents in a MongoDB app, but coming from my update function I get "Cannot read properties of undefined (reading 'updateOne')" in the browser. That example is for updateOne, but it happens for…
curtis
  • 17
  • 4
0
votes
1 answer

Elastic query combining should (boolean OR) with retrieval of nested documents

I have an Elastic index with nested documents. I am trying to retrieve multiple documents by ids along with their nested documents. Retrieving the documents themselves is simple enough with a Should query, but where and how would I include the…
martin_wun
  • 1,599
  • 1
  • 15
  • 33
0
votes
0 answers

springboot monogdb update nested document

Document Structure { "_id": { "$oid": "61e6e300f78f707b9c3ec32f" }, "userId": "61d51daa0e09c2a97f11c81d", "services": [ { "sId": "62036c3cde7ac3b60203bdb5", "status": 1, "permissionGroups": [ { …