I tried uploading a sample JSON file into Vectara using the dashboard but it kept throwing errors one after the other. Here is the final JSON format I arrived at before resorting to asking for help on this forum.
I’m getting 400 error code saying:
Invalid JSON: Cannot find field: restaurantName in message com.vectara.indexing.Section
Here is my filter attribute screenshot:
I reviewed this documentation section which showed how the document object needs to be formatted and that’s what I did, but still throws an error.
{
"documentId": "BurgersDoc1",
"title": "Top Burgers in Philly",
"section": [
{
"restaurantName": "Fountain Porter",
"dishNames": [
"cheeseburger"
],
"description": "some description",
"address": {
"address": "1601 S 10th Street",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19148"
},
"formattedAddress": "1601 S 10th Street, Philadelphia, PA 19148"
},
{
"restaurantName": "Butcher & Singer",
"dishNames": [
"burger"
],
"description": "another description",
"address": {
"address": "1500 Walnut Street",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19102"
},
"formattedAddress": "1500 Walnut Street, Philadelphia, PA 19102"
},
{
"restaurantName": "Standard Tap",
"dishNames": [
"burger"
],
"description": "hello world.",
"address": {
"address": "901 N 2nd Street",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19123"
},
"formattedAddress": "901 N 2nd Street, Philadelphia, PA 19123"
},
{
"restaurantName": "Pub & Kitchen",
"dishNames": [
"burger"
],
"description": "goodbye world",
"address": {
"address": "1946 Lombard Street",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19146"
},
"formattedAddress": "1946 Lombard Street, Philadelphia, PA 19146"
},
{
"restaurantName": "Rouge",
"dishNames": [
"burger"
],
"description": "final world.",
"address": {
"address": "205 South 18th Street",
"city": "Philadelphia",
"state": "PA",
"zipCode": "19103"
},
"formattedAddress": "205 South 18th Street, Philadelphia, PA 19103"
}
]
}