How to create a custom index.