
//
// Delete an object from the index based on firebase snapshot
// This should only be used as a 'child_removed' firebase callback
//
const deleteFromIndex = ({ fbRef, CONFIG, dataset, fb, algolia }) => {

  const objectID = dataset.key ? fbRef.val()[dataset.key] : fbRef.key();

  const index = algolia.initIndex(dataset.index);

  // Remove the object from Algolia
  return index.deleteObject(objectID)
    .then(task => index.waitTask(task.taskID));

};

export default deleteFromIndex;

@@ -1,12 +1,130 @@
+import Debug from './debug';%0A%0Aconst info = Debug('info:remove-from-index');%0Aconst debug = Debug('remove-from-index');%0A
 %0A//%0A// Delet
@@ -393,16 +393,90 @@
 key();%0A%0A
+  info(%60Removing $%7Bdataset.path%7D from index with objectID $%7BobjectID%7D%60);%0A%0A
   const 
@@ -638,17 +638,93 @@
 taskID))
-;
+%0A    .then(() =%3E debug(%60Done removing $%7Bdataset.path%7D objectID $%7BobjectID%7D%60))
 %0A%0A%7D;%0A%0Aex

Add some debug/info output