add init function for idb based index