haskell/hackage-server — pull request #77 by gracenotes (2013-09-25 16:01:38+00:00)
Title: When updating a document in search, update termIdMap so that invariants hold

Be more explicit about map changing here, as well, because Data.Map has no nice "alter and return old" function.