 
 .factory "updateIndex", ->
   updateIndex = (tr) ->
-    
     # save date as number
     tr.$priority = +new Date(tr.date)
+
+    # no keywords for deleted
+    if tr.deleted
+      tr.keywords = {deleted: true}
+      tr.indexVersion = VERSION
+      return
+    
     
     # index keywords
     keywords = [

    for tr in transactions
      for k of tr.keywords
        # XXX hack: skip these from search (no need)
        unless k.match /^(to|from|text):/
          keywords[k] = true

    result = []

        kws[field + ":" + s.split(" ")[0]] = true
      return

    kws.all = true
    tr.keywords = kws
    tr.indexVersion = VERSION
    return
  VERSION = 13
  updateIndex.sanitize = (s) ->
    
    # convert to string
