I have long been saying that the requirements for Permalinks and ES document ids are not the same.
Document ids *must* be unique, should be stable, but don't have to be. Permalinks should be unique, but must be stable. I've just come across a use-case where separating the two would be vey useful: Assume that a message has been uploaded to the database and the Permalink has been used. It's then discovered that some of the message body was corrupted when the message was archived. For example, the encoding was not properly handled. The code is fixed, and the message can be re-imported. This will generate a new doc id. With the current design, it will also generate a new Permalink. However, if Permalinks were defined to be stable, that would not happen. The corrected version of the message (and the corrupted version) could both be found with the original Permalink. If desired, the original corrupted mail could be deleted.
