Get a typed JSON document from the index based on its id.