I have an e-commerce store and the table structure of that is as follows:
Products
product_id | name price
1 galaxy s9 red 800
2 galaxy s9 blue 850
3 t-shirt 30
Product Variants
procut_variant_id product_id variant_name
1 1 red
2 1 128gb
3 2 blue
4 2 128gb
5 3 xl
I'm submitting the documents through solarium php and this is the format which I've got: We've got more than 1200 product variants. How do I make a schema for this kind of Data?
Is this okay? FYI:I have no prior experience in Apache Solr.
"responseHeader":{
"status":0,
"QTime":27,
"params":{
"q":"*:*",
"_":"1550306389227"}},
"response":{"numFound":3,"start":0,"docs":[
{
"id":"1",
"name":[" galaxy s9 red"],
"price":[800],
"memory":["128GB"],
"color":["red"],
"_version_":1625614359718789120},
{
"id":"2",
"name":["galaxy s9 blue"],
"price":[850],
"memory":["128GB"],
"color":["blue"],
"_version_":1625614359913824256},
{
"id":"3",
"name":["t-shirt"],
"price":[30],
"Size":["xl"],
"_version_":1625614360041750528}]
}}