Changed the table name in the create_index function to use the configuration table name instead of only 'users'