tickets = [
{
"title": "Issue with my account",
"description": "I cannot log in to my account",
"status": "open",
"id": 1,
},
{
"title": "Payment issue",
"description": "I cannot pay for my subscription",
"status": "open",
"id": 2,
},
{
"title": "Feature request",
"description": "I would like to request a new feature",
"status": "closed",
"id": 3,
},
{
"title": "Slow response time",
"description": "The response time for queries is too slow",
"status": "open",
"id": 4,
},
{
"title": "Data sync error",
"description": "There is an error syncing data across devices",
"status": "open",
"id": 5,
},
{
"title": "App crash on launch",
"description": "The app crashes every time I try to launch it",
"status": "open",
"id": 6,
},
]
for ticket in tickets:
index.add(Document(
content=ticket["title"] + ' ' + ticket["description"],
metadata={
"status": ticket["status"],
"id": ticket["id"],
}
))