Peel and finely dice the onions. Peel garlic and chop finely. Wash, clean and chop the tomatoes. Pears wash, peel, quarter and remove the core. Cut pear quarters into pieces.
Peel and finely chop the ginger. Wash the rosemary and thyme and shake dry. Strip rosemary needles from the twigs and chop finely. Pluck thyme leaves from the stalks and chop. Clean the chilli, cut lengthwise, wash and remove seeds.
Cut the pod into small pieces.
Heat the oil in a pot. Sauté onions, garlic, ginger and chili for about 1 minute. Add sugar and caramelize. Deglaze with vinegar and water and simmer for about 2 minutes. Stir in tomato paste, tomatoes and pears.
Add star anise, cardamom, cloves, mustard seeds, cinnamon stick and herbs and simmer for about 12-15 minutes. Season to taste with salt and pepper and pour into clean rinsed glasses and allow to cool.