This message was deleted.
# community-help
s
This message was deleted.
a
Copy code
{
            "facet": false,
            "index": false,
            "infix": false,
            "locale": "",
            "name": "options",
            "optional": true,
            "sort": false,
            "stem": false,
            "stem_dictionary": "",
            "store": true,
            "type": "object"
        },
        {
            "facet": true,
            "index": true,
            "infix": false,
            "locale": "",
            "name": "options.shade",
            "optional": true,
            "sort": false,
            "stem": false,
            "stem_dictionary": "",
            "store": true,
            "type": "string"
        },
        {
            "facet": true,
            "index": true,
            "infix": false,
            "locale": "",
            "name": "options.color",
            "optional": true,
            "sort": false,
            "stem": false,
            "stem_dictionary": "",
            "store": true,
            "type": "string"
        },
        {
            "facet": true,
            "index": true,
            "infix": false,
            "locale": "",
            "name": "options.volume",
            "optional": true,
            "sort": false,
            "stem": false,
            "stem_dictionary": "",
            "store": true,
            "type": "string"
        },
        {
            "facet": true,
            "index": true,
            "infix": false,
            "locale": "",
            "name": "options.size",
            "optional": true,
            "sort": false,
            "stem": false,
            "stem_dictionary": "",
            "store": true,
            "type": "string"
        }
Sample document -
Copy code
{
  "available": false,
  "brandId": "67dab128304dfe15b3244ec2",
  "brandName": "Desi Minimals",
  "categoryId": "670014c073fb1b5ab9355639",
  "categoryName": "Fashion",
  "compareAtPrice": 1890,
  "description": "<p dir=\"ltr\"><strong>Timeless design, all-day ease.<br></strong><span>Crafted from soft cotton twill. Designed with a straight-leg cut, functional side and back pockets, and a clean, versatile look that works everywhere.</span></p>\n<p dir=\"ltr\"><strong>Material —</strong><span>100% Cotton</span><span><br></span><strong>Fit —</strong><span> Relaxed/Straight Fit</span></p>\n<p dir=\"ltr\"><span>The male model's height is </span><strong>6'1\"</strong><span> and he's wearing size </span><strong>Medium.</strong></p>",
  "externalProductId": "7778922397854",
  "externalVariantId": "43568843653278",
  "featuredImage": "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
  "handle": "muted-green-relaxed-chinos",
  "id": "683ed4d17455531dd6dc1853-683ed4d17455531dd6dc1862",
  "images": [
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3864.jpg?v=1732342175",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3868.jpg?v=1732342176",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3856_5a222832-024f-4df7-a8e3-7f078920c37d.jpg?v=1732342176",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3861.jpg?v=1732342176",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3849.jpg?v=1732342175",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3863.jpg?v=1732342175",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3854.jpg?v=1732342175",
    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3867.jpg?v=1732342176"
  ],
  "normalisationConfidence": 0.9,
  "normalisedTags": {
    "Gender": [
      "Men"
    ],
    "Material/Fabric": [
      "Cotton"
    ],
    "Print Type": [
      "Solid"
    ],
    "Style Type": [
      "Casual"
    ]
  },
  "options": {
    "color": "Muted Green",
    "size": "X-Large - 36",
    "style": "Straight Fit"
  },
  "price": 1890,
  "productId": "683ed4d17455531dd6dc1853",
  "productTitle": "Classic Relaxed Chinos — Muted Green",
  "productType": "Trousers",
  "publishedAt": "2024-04-14T16:01:28+05:30",
  "publishedAtEpoch": 1748961063353,
  "shopifyProductId": 7778922397854,
  "shopifyVariantId": 43568843653278,
  "sku": "W8D5P38XL",
  "subCategory": "Bottoms",
  "tags": [],
  "title": "X-Large - 36 / Muted Green / Straight Fit",
  "updatedAt": "2025-06-03T14:31:03.353417182",
  "updatedAtEpoch": 1748961063353,
  "variantId": "683ed4d17455531dd6dc1862",
  "vendor": "Desi Minimals",
  "visualOptionId": "7778922397854-muted-green-straight-fit"
}
a
Hey, Can you share the exact query you're running and what result you're expecting? That’ll help us figure out if this is related to your cluster setup. Also, if you could create a minimal reproducible example using the following model: https://gist.github.com/jasonbosco/7c3432713216c37847 I will use it to further investigate!
a
So, I'm calling typesense rest api - Sharing the exact curl curl --location 'xyz/collections/variantV2/documents/search?query_by=productType%2Coptions.size%2Coptions.color&q=&per_page=100&page=1&facet_by=options.size%2Coptions.color%2CproductType' \ --header 'X-TYPESENSE-API-KEY: abc' Facet counts -
Copy code
facet_counts": [
        {
            "counts": [],
            "field_name": "options.size",
            "sampled": false,
            "stats": {
                "total_values": 0
            }
        },
        {
            "counts": [],
            "field_name": "options.color",
            "sampled": false,
            "stats": {
                "total_values": 0
            }
        },
        {
            "counts": [
                {
                    "count": 104,
                    "highlighted": "Oversized T-Shirt",
                    "value": "Oversized T-Shirt"
                },
                {
                    "count": 49,
                    "highlighted": "Trousers",
                    "value": "Trousers"
                },
                {
                    "count": 35,
                    "highlighted": "Crop Tops",
                    "value": "Crop Tops"
                },
                {
                    "count": 24,
                    "highlighted": "Polo",
                    "value": "Polo"
                },
                {
                    "count": 12,
                    "highlighted": "Sweatshirts",
                    "value": "Sweatshirts"
                },
                {
                    "count": 12,
                    "highlighted": "Regular T-Shirt",
                    "value": "Regular T-Shirt"
                },
                {
                    "count": 3,
                    "highlighted": "Hair Accessories",
                    "value": "Hair Accessories"
                },
                {
                    "count": 2,
                    "highlighted": "Bags",
                    "value": "Bags"
                }
            ],
            "field_name": "productType",
            "sampled": false,
            "stats": {
                "total_values": 8
            }
        }
    ]
so my productType is correctly faceted. I'm seeing correct result but I'm getting nothing in options.size and options.color
f
Could you also add a few curl commands for the collection / document creation? Without the dataset it's going to be difficult to debug
From a quick glance, I think
facet_return_parent
is what will fix this issue
a
Shall i share sample documents?
Copy code
{
            "document": {
                "available": false,
                "brandId": "67dab128304dfe15b3244ec2",
                "brandName": "Desi Minimals",
                "categoryId": "670014c073fb1b5ab9355639",
                "categoryName": "Fashion",
                "compareAtPrice": 1890.0,
                "description": "<p dir=\"ltr\"><strong>Timeless design, all-day ease.<br></strong><span>Crafted from soft cotton twill. Designed with a straight-leg cut, functional side and back pockets, and a clean, versatile look that works everywhere.</span></p>\n<p dir=\"ltr\"><strong>Material —</strong><span>100% Cotton</span><span><br></span><strong>Fit —</strong><span> Relaxed/Straight Fit</span></p>\n<p dir=\"ltr\"><span>The male model's height is </span><strong>6'1\"</strong><span> and he's wearing size </span><strong>Medium.</strong></p>",
                "externalProductId": "7778922397854",
                "externalVariantId": "43568843653278",
                "featuredImage": "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
                "handle": "muted-green-relaxed-chinos",
                "id": "683ed4d17455531dd6dc1853-683ed4d17455531dd6dc1862",
                "images": [
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3864.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3868.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3856_5a222832-024f-4df7-a8e3-7f078920c37d.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3861.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3849.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3863.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3854.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3867.jpg?v=1732342176"
                ],
                "normalisationConfidence": 0.9,
                "normalisedTags": {
                    "Gender": [
                        "Men"
                    ],
                    "Material/Fabric": [
                        "Cotton"
                    ],
                    "Print Type": [
                        "Solid"
                    ],
                    "Style Type": [
                        "Casual"
                    ]
                },
                "options": {
                    "color": "Muted Green",
                    "size": "X-Large - 36",
                    "style": "Straight Fit"
                },
                "price": 1890.0,
                "productId": "683ed4d17455531dd6dc1853",
                "productTitle": "Classic Relaxed Chinos — Muted Green",
                "productType": "Trousers",
                "publishedAt": "2024-04-14T16:01:28+05:30",
                "publishedAtEpoch": 1748961063353,
                "shopifyProductId": 7778922397854,
                "shopifyVariantId": 43568843653278,
                "sku": "W8D5P38XL",
                "subCategory": "Bottoms",
                "tags": [],
                "title": "X-Large - 36 / Muted Green / Straight Fit",
                "updatedAt": "2025-06-03T14:31:03.353417182",
                "updatedAtEpoch": 1748961063353,
                "variantId": "683ed4d17455531dd6dc1862",
                "vendor": "Desi Minimals",
                "visualOptionId": "7778922397854-muted-green-straight-fit"
            },
            "highlight": {},
            "highlights": [],
            "text_match": 100,
            "text_match_info": {
                "best_field_score": "0",
                "best_field_weight": 12,
                "fields_matched": 4,
                "num_tokens_dropped": 1,
                "score": "100",
                "tokens_matched": 0,
                "typo_prefix_score": 255
            }
        },
        {
            "document": {
                "available": false,
                "brandId": "67dab128304dfe15b3244ec2",
                "brandName": "Desi Minimals",
                "categoryId": "670014c073fb1b5ab9355639",
                "categoryName": "Fashion",
                "compareAtPrice": 1890.0,
                "description": "<p dir=\"ltr\"><strong>Timeless design, all-day ease.<br></strong><span>Crafted from soft cotton twill. Designed with a straight-leg cut, functional side and back pockets, and a clean, versatile look that works everywhere.</span></p>\n<p dir=\"ltr\"><strong>Material —</strong><span>100% Cotton</span><span><br></span><strong>Fit —</strong><span> Relaxed/Straight Fit</span></p>\n<p dir=\"ltr\"><span>The male model's height is </span><strong>6'1\"</strong><span> and he's wearing size </span><strong>Medium.</strong></p>",
                "externalProductId": "7778922397854",
                "externalVariantId": "43568843620510",
                "featuredImage": "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
                "handle": "muted-green-relaxed-chinos",
                "id": "683ed4d17455531dd6dc1853-683ed4d17455531dd6dc1861",
                "images": [
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3864.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3853.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3868.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3856_5a222832-024f-4df7-a8e3-7f078920c37d.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3861.jpg?v=1732342176",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3849.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3863.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3854.jpg?v=1732342175",
                    "https://cdn.shopify.com/s/files/1/0266/3943/3802/files/DSC_3867.jpg?v=1732342176"
                ],
                "normalisationConfidence": 0.9,
                "normalisedTags": {
                    "Gender": [
                        "Men"
                    ],
                    "Material/Fabric": [
                        "Cotton"
                    ],
                    "Print Type": [
                        "Solid"
                    ],
                    "Style Type": [
                        "Casual"
                    ]
                },
                "options": {
                    "color": "Muted Green",
                    "size": "Large - 34",
                    "style": "Straight Fit"
                },
                "price": 1890.0,
                "productId": "683ed4d17455531dd6dc1853",
                "productTitle": "Classic Relaxed Chinos — Muted Green",
                "productType": "Trousers",
                "publishedAt": "2024-04-14T16:01:28+05:30",
                "publishedAtEpoch": 1748961063353,
                "shopifyProductId": 7778922397854,
                "shopifyVariantId": 43568843620510,
                "sku": "W8D5P38L",
                "subCategory": "Bottoms",
                "tags": [],
                "title": "Large - 34 / Muted Green / Straight Fit",
                "updatedAt": "2025-06-03T14:31:03.353411057",
                "updatedAtEpoch": 1748961063353,
                "variantId": "683ed4d17455531dd6dc1861",
                "vendor": "Desi Minimals",
                "visualOptionId": "7778922397854-muted-green-straight-fit"
            },
            "highlight": {},
            "highlights": [],
            "text_match": 100,
            "text_match_info": {
                "best_field_score": "0",
                "best_field_weight": 12,
                "fields_matched": 4,
                "num_tokens_dropped": 1,
                "score": "100",
                "tokens_matched": 0,
                "typo_prefix_score": 255
            }
        }
a
Hey @Aditya Verma, in the meantime, could you upgrade your cluster to v29.0? Checking you cluster, we've seem some crashes and it's a threading problem already solved in v29~. It might even be related to this problem.
a
Which one? There are multiple versions
a
You can update to the latest one, 29.0.rc27
a
I have upgraded the cluster. Still it's not working
a
Tks @Aditya Verma, I will investigate further
Hey @Aditya Verma, Looking at yours chema configuration, I don't see options.size, options.color and options.style. They are declared as root-level fields:
Copy code
{
      "facet": false,
      "index": false,
      "infix": false,
      "locale": "",
      "name": "options",
      "optional": true,
      "sort": false,
      "stem": false,
      "stem_dictionary": "",
      "store": true,
      "type": "object"
    },
    {
      "facet": true,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "size",
      "optional": true,
      "sort": false,
      "stem": false,
      "stem_dictionary": "",
      "store": true,
      "type": "string"
    },
    {
      "facet": true,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "color",
      "optional": true,
      "sort": false,
      "stem": false,
      "stem_dictionary": "",
      "store": true,
      "type": "string"
    },
Can you try updating the schema and try again? Important to remember to set the as
facet: true
and
options.<field>
a
I did define it. I thought resolution could take some time, so I deleted and flattened it.