how to create custom indices