Add index method

Add a index method parameter to the create index function