[SERVER-32472] Recursive query of nested document Created: 28/Dec/17  Updated: 26/Jan/18  Resolved: 31/Dec/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Luis Torres Aguiar da Costa Assignee: Kelsey Schubert
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-267 Wildcard support in index/query/proje... Backlog
Participants:

 Description   

I have a collection that has 'nested' documents. For example, a document can have the following structure:

{
    "condition": {
        "parameter": {
            "type": "person"
        }
    }
}

as well as:

{
    "condition": {
        "conditions": [
            {
                "conditions": [
                    {
                        "parameter": {
                            "type": "A"
                        }
                    },
                    {
                        "parameter": {
                            "type": "B"
                        }
                    }
                ]
            },
            {
                "parameter": {
                    "type": "C"
                }
            }
        ]
    }
}

Meaning, each condition sub-document can have multiple conditions within itself.

Now, I'd want to make a 'recursive' query on the type field of each condition, something like ('..' representing the recursion):

{
    "$or": [
        {"condition.type": "person"},
        {"condition..conditions.type": "person"}
    ]
}

From what I've seen there's no way to do this yet, but it would be really awesome.



 Comments   
Comment by Kelsey Schubert [ 31/Dec/17 ]

Thanks for confirming, LuisTAC. If you haven't done so already, please feel free to vote for SERVER-267 and watch it for updates.

Kind regards,
Kelsey

Comment by Luis Torres Aguiar da Costa [ 31/Dec/17 ]

Hi. Yes, it seems SERVER-267, addresses the same feature as the one I proposed. Didn't find it, probably due to thinking about it in a different way, but it's essentially the same.

Comment by Kelsey Schubert [ 29/Dec/17 ]

Hi LuisTAC,

Would you please take a look at SERVER-267 and let me know if you think it is a duplicate? I believe this feature request addresses the same issue.

Thank you,
Kelsey

Generated at Thu Feb 08 04:30:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.