[COMPASS-3427] api: nested documents in json should stay nested in SchemaParser struct Created: 31/Jan/19  Updated: 19/Feb/19  Resolved: 15/Feb/19

Status: Closed
Project: Compass
Component/s: schema.rs
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Irina Shestak (Inactive) Assignee: Irina Shestak (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: COMPASS-3418
Story Points: 5
Sprint: Iteration Xiaolongbao

 Description   

current output:

 

{
      "name": "city",
      "path": "address.city",
      "count": 0,
      "field_type": null,
      "probability": null,
      "has_duplicates": true,
      "types": [
        {
          "name": "String",
          "path": "address.city",
          "count": 99,
          "bsonType": "String",
          "probability": null,
          "values": [
            {
              "Str": "El Paso, Texas"
            },
            {
              "Str": "El Paso, Texas"
            },
          ]
        }
      ]
},
{
      "name": "street",
      "path": "address.street",
      "count": 0,
      "field_type": null,
      "probability": null,
      "has_duplicates": false,
      "types": [
        {
          "name": "String",
          "path": "address.street",
          "count": 99,
          "bsonType": "String",
          "probability": null,
          "values": [
            {
              "Str": "133 Aloha Ave"
            },
            {
              "Str": "290 East George Rd"
            }
          ]
        }
      ]
}

 

expected output:

{
    "name": "address",
    "path": "address",
    "count": 100,
    "types": [{
      "name": "Document",
      "bsonType": "Document",
      "path": "address",
      "count": 100,
      "fields": [
         {
          "name": "city",
          "path": "address.city",
          "count": 100,
          "types": [{
            "name": "String",
            "bsonType": "String",
            "path": "address.city",
            "count": 100,
            "values": ["El Paso, Texas", "El Paso, Texas"]
          }]
         }, {
           "name": "street",
           "path": "address.street",
           "count": 100,
           "types": [{
             "name": "String",
             "bsonType": "String",
             "path": "address.street",
             "count": 100,
             "values": ["133 Aloha Ave", "290 East George Rd"]
           }]
         }]
      }]
}


Generated at Wed Feb 07 22:33:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.