# About Nested Data Search

**URL:** https://forum.weaviate.io/t/about-nested-data-search/1568
**Category:** Support
**Created:** [February 26, 2024, 12:32am UTC](https://forum.weaviate.io/t/about-nested-data-search/1568 "2024-02-26T00:32:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![exsbandit](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/exsbandit/32/1027_2.png) [@exsbandit](https://forum.weaviate.io/u/exsbandit)
#### Post date: [February 26, 2024, 12:32am UTC](https://forum.weaviate.io/t/about-nested-data-search/1568/1 "2024-02-26T00:32:08Z")

</div>

Hello, when I perform a query search in the Weaviate console as shown below, I receive the following data as a result. I want to create a GraphQL search using the ‘name’ and ‘quantity’ from the ‘ingredients’ key, and also use the ‘color’ value from the ‘properties’ key. How can I achieve this?

```auto
{
  Get {
    Adata (limit:2) {
      code
      description
      name
      ingredients {
        code
        name
        quantity
        unit
      }
      properties {
        color
        region
        viscosity
      }
    }
  }
}

```

Result:

```auto
{
  "data": {
    "Get": {
      "Adata": [
        {
          "code": "prd002",
          "description": "Savory Caesar Salad",
          "ingredients": [
            {
              "code": "xxx",
              "name": "Romaine lettuce",
              "quantity": "100",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Grilled chicken",
              "quantity": "100",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Parmesan cheese",
              "quantity": "50",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Croutons",
              "quantity": "30",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Caesar dressing",
              "quantity": "20",
              "unit": "gr"
            }
          ],
          "name": "Savory Caesar Salad",
          "properties": [
            {
              "color": "#a02",
              "region": "#c02",
              "viscosity": "#b02"
            }
          ]
        },
        {
          "code": "prd001",
          "description": "Sweet Strawberry Spinach Salad",
          "ingredients": [
            {
              "code": "xxx",
              "name": "Baby spinach",
              "quantity": "100",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Strawberries",
              "quantity": "100",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Goat cheese",
              "quantity": "50",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Candied pecans",
              "quantity": "30",
              "unit": "gr"
            },
            {
              "code": "xxx",
              "name": "Balsamic glaze",
              "quantity": "20",
              "unit": "gr"
            }
          ],
          "name": "Sweet Strawberry Spinach Salad",
          "properties": [
            {
              "color": "#a01",
              "region": "#c01",
              "viscosity": "#b01"
            }
          ]
        }
      ]
    }
  }
}

```

### Server Setup Information

- Weaviate Server Version:  
semitechnologies/weaviate:1.23.10

My Schema

```auto
{
  "classes": [
    {
      "class": "Adata",
      "description": "Information from data",
      "vectorizer": "text2vec-openai",
      "moduleConfig": {
        "text2vec-openai": {
          "model": "ada",
          "type": "text"
        }
      },
      "properties": [
        {
          "dataType": [
            "text"
          ],
          "description": "Product name",
          "moduleConfig": {
            "text2vec-openai": {
              "skip": "false",
              "vectorizePropertyName": "false"
            }
          },
          "name": "name"
        },
        {
            "dataType": ["object"],
            "name": "ingredients",
            "nestedProperties": [
                {"dataType": ["text"], "name": "code"},
                {"dataType": ["text"], "name": "name"},
                {"dataType": ["number"], "name": "quantity"},
                {"dataType": ["text"], "name": "unit"}
            ],
            "description": "The ingredients",
            "moduleConfig": {
                "text2vec-openai": {
                  "skip": "false",
                  "vectorizePropertyName": "false"
                }
            }
        },
        {
            "dataType": ["object"],
            "name": "properties",
            "nestedProperties": [
                {"dataType": ["text"], "name": "color"},
                {"dataType": ["text"], "name": "viscosity"},
                {"dataType": ["text"], "name": "region"}
            ],
            "description": "The properties",
            "moduleConfig": {
                "text2vec-openai": {
                  "skip": "false",
                  "vectorizePropertyName": "false"
                }
            }
        },
        {
          "dataType": [
            "text"
          ],
          "description": "The code",
          "moduleConfig": {
            "text2vec-openai": {
              "skip": "false",
              "vectorizePropertyName": "false"
            }
          },
          "name": "code"
        }
      ]
    }
  ]
}

```

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [February 26, 2024, 11:28am UTC](https://forum.weaviate.io/t/about-nested-data-search/1568/2 "2024-02-26T11:28:51Z")

</div>

Hi @exsbandit ! Welcome to our community 🤗

For now, It’s not possible to filter and get it’s data vectorized for nested objects.

Here we have a feature request:

> <https://github.com/weaviate/weaviate/issues/3694>
>
> \#2424 introduced storing of nested objects. The next step is to make filtering (…and vectorization for modules) available for them.

Please, leave your thumbs up so we can make it a priority in our roadmap:

> **[Roadmap | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/roadmap)**
>
> Overview

Let me know if that helps.

Thanks!

---

<div class="post-metadata">

### Author: ![exsbandit](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/exsbandit/32/1027_2.png) [@exsbandit](https://forum.weaviate.io/u/exsbandit)
#### Post date: [February 26, 2024, 11:45am UTC](https://forum.weaviate.io/t/about-nested-data-search/1568/3 "2024-02-26T11:45:44Z")

</div>

Thanks @DudaNogueira for your answer,

Can you suggest how I can insert and search the following JSON data? For example, I need to make checks with a query where ‘ingredients’ → ‘name’ is ‘cheese’ and ‘properties’ → ‘color’ is ‘red’.

```auto
[
    {
       "code":"prd001",
       "properties":[
          {
             "color":"#a01",
             "viscosity":"#b01",
             "region":"#c01"
          }
       ],
       "name":"Sweet Strawberry Spinach Salad",
       "ingredients":[
          {
             "code":"xxx",
             "name":"Baby spinach",
             "quantity":"100",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Strawberries",
             "quantity":"100",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Goat cheese",
             "quantity":"50",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Candied pecans",
             "quantity":"30",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Balsamic glaze",
             "quantity":"20",
             "unit":"gr"
          }
       ]
    },
    {
       "code":"prd002",
       "properties":[
          {
             "color":"#a02",
             "viscosity":"#b02",
             "region":"#c02"
          }
       ],
       "name":"Savory Caesar Salad",
       "ingredients":[
          {
             "code":"xxx",
             "name":"Romaine lettuce",
             "quantity":"100",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Grilled chicken",
             "quantity":"100",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Parmesan cheese",
             "quantity":"50",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Croutons",
             "quantity":"30",
             "unit":"gr"
          },
          {
             "code":"xxx",
             "name":"Caesar dressing",
             "quantity":"20",
             "unit":"gr"
          }
       ]
    },
.
.
.

```

---

<div class="post-metadata">

### Author: ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)
#### Post date: [February 26, 2024, 12:52pm UTC](https://forum.weaviate.io/t/about-nested-data-search/1568/4 "2024-02-26T12:52:09Z")

</div>

You will have to ingest those properties as text.

So you will endup with a “flat” object.

Let me know if that helps 🙂
