In a pot over medium heat, soften the onion and ginger in the oil. Add the spices and cook for 1 minute, stirring constantly. Add the remaining ingredients. Bring to a boil, then simmer for 20 minutes or until the liquid becomes slightly syrupy, stirring occasionally.
Pour the mixture into sealable jars. Let cool, then refrigerate. The relish will keep for 1 month in the refrigerator. Jars of relish can also be sterilized to extend their shelf life to up to 1 year at room temperature.