Chop the onion and saute it in a pan with 2 tablespoons of oil and enough salt until it is transparent in color or slightly browned. Keep this sauteed onion aside.
Wash the rice and soak in water for about 30 minutes.
After 30 minutes of soaking, drain the water and keep the rice aside.
Ina large pan, heat the oil and add the following spices - cardamom pods, cloves, cinnamon sticks, bay leaf and star anise and fry for a few seconds.
Add the rice to the pan, add salt and saute for another 1 minute.
Add ginger garlic paste and mix well.
Add the sauteed onions to this rice mix, and stir everything well.
Add all the spices (turmeric, red chili powder, cumin seeds powder, black pepper powder and garam masala powder) to the rice onion mixture, and saute well for 1 to 2 minutes.
Meanwhile boil the water in another pan.
As the water starts boiling, add the boiling water to the rice and mix well.
Close the pan and cook in very low heat for about 10 to 12 minutes or until all water is absorbed.
After 10 to 12 minutes of cooking, check to see if the rice is cooked and soft. Even if the rice is only half cooked (it may happen depending on the stove) you don't have to worry as our next step will take care of it.
Heat an iron skillet and place the pan (which has the rice) on top of it and cover the pan with lid. Cook in low to medium heat for about 5 to 8 minutes or until the rice is perfectly cooked and have the right texture, stirring occasionally.
Once the rice is done, you can switch off the stove and keep it closed. Now the rice is ready, we need to prepare the toppings for the rice including caramelizing the onions and frying the cashews.