product_schema_obj = {
'name': collection_name,
'fields': [
{ "name": "tag", "type": "int32","allow_empty": True,"facet": True },
{ "name": "colorCount", "type": "int32","allow_empty": True,"facet": True },
{ "name": "totalNoOfRating", "type": "int32","allow_empty": True,"facet": True },
{ "name": "createdTimestamp", "type": "int32","facet": True},
{"name": "id", "type": "string" },
{"name": "parentProductId", "type": "string","facet": True },
{"name": "productName", "type": "string", "facet": True},
{'name': 'colourName', 'type': 'string',"facet": True,"allow_empty": True},
{'name': 'size', 'type': 'string',"facet": True,"allow_empty": True},
{"name": "slug", "type": "string"},
{"name": "searchAbleAttributes", "type": "object[]","facet": True,"allow_empty": True},
{ "name": "variantCount", "type": "int32","allow_empty": True},
{ "name": "maxQuantity", "type": "int32","allow_empty": True },
{ "name": "categoryList", "type": "object[]","facet": True, "fields": [
{ "name": "categoryId", "type": "string",},
{ "name": "categoryName", "type": "string","facet": True },
{ "name": "slug", "type": "string" }
],"allow_empty": True
},
{ "name": "offers", "type": "object", "fields": [
{ "name": "offerId", "type": "string" },
{ "name": "offerFor", "type": "int32" },
{ "name": "offerName", "type": "object", "fields": [
{ "name": "en", "type": "string" },
{ "name": "fr", "type": "string" },
{ "name": "hi", "type": "string" }
]
},
{ "name": "discountType", "type": "int32" },
{ "name": "discountValue", "type": "float" },
{ "name": "status", "type": "int32" ,"facet": True}
],"allow_empty": True
},
{ "name": "finalPriceList", "type": "object","facet": True, "fields": [
{ "name": "basePrice", "type": "float","facet": True},
{ "name": "finalPrice", "type": "float","facet": True},
{ "name": "discountPrice", "type": "float","facet": True},
{ "name": "discountPercentage", "type": "float","facet": True },
{ "name": "discountType", "type": "int32"},
{ "name": "taxRate", "type": "float" },
]
},
{"name": "availableQuantity", "type": "int32"},
{"name": "currency", "type": "string", "facet": True},
{"name": "currencySymbol", "type": "string", "facet": True},
{"name": "brandTitle", "type": "string", "facet": True,"allow_empty": True},
{"name": "images", "type": "object[]"},
{"name": "popularScore", "type": "float"},
{"name": "avgRating", "type": "float","facet": True},
{"name": "totalReview", "type": "int32","facet": True},
{"name": "inStock", "type": "bool", "facet": True},
{"name": "storeId", "type": "string" },
{"name": "isAllVariantInStock", "type": "string" },
{ "name": "finalPrice", "type": "string"},
{"name": "metaData", "type": "object[]","allow_empty": True,"facet": True},
# {'name': 'product_name_vector', 'type': 'float[]', 'num_dim': 384},
# {'name': 'detailDescription_vecto', 'type': 'float[]', 'num_dim': 384},
{"name": "rating_score", "type": "float","facet": True},
{"name": "sellerRevenue", "type": "float","facet": True},
{"name": "positive_percentage", "type": "float","facet": True},
{
"name": "embedding",
"type": "float[]",
"embed": {
"from": [
"productName",
"colourName",
"brandTitle",
"finalPrice"
],
"model_config": {
"model_name": "ts/all-MiniLM-L12-v2",
}
}
}
],
'default_sorting_field': 'popularScore',
"enable_nested_fields": True
}
return product_schema_obj
This is my schema. Can you guide me on what needs to be done here?